alex1818 / serf

Automatically exported from code.google.com/p/serf
Apache License 2.0
0 stars 0 forks source link

compilation of test/server/test_server.c breaks with CodeWarrior compiler #105

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compile with CodeWarrior compiler for NetWare

What version of the product are you using? On what operating system?
serf-HEAD, NetWare target.

Please provide any additional information below.
Metrowerks CodeWarrior is too stupid to take vars as struct inits, therefore 
struct members which are initialized with vars need to be separately set.
Fix:
Index: test/server/test_server.c
===================================================================
--- test/server/test_server.c   (revision 1914)
+++ test/server/test_server.c   (working copy)
@@ -232,16 +232,18 @@
     /* Don't accept new connection while processing client connection. At
        least for present time.*/
     if (servctx->client_sock) {
-        apr_pollfd_t pfd = { pool, APR_POLL_SOCKET, APR_POLLIN | APR_POLLOUT, 
0,
+        apr_pollfd_t pfd = { NULL, APR_POLL_SOCKET, APR_POLLIN | APR_POLLOUT, 
0,
                              { NULL }, NULL };
+        pfd.p = pool;
         pfd.desc.s = servctx->client_sock;
         status = apr_pollset_add(pollset, &pfd);
         if (status != APR_SUCCESS)
             goto cleanup;
     }
     else {
-        apr_pollfd_t pfd = { pool, APR_POLL_SOCKET, APR_POLLIN, 0,
+        apr_pollfd_t pfd = { NULL, APR_POLL_SOCKET, APR_POLLIN, 0,
                              { NULL }, NULL };
+        pfd.p = pool;
         pfd.desc.s = servctx->serv_sock;
         status = apr_pollset_add(pollset, &pfd);
         if (status != APR_SUCCESS)

Original issue reported on code.google.com by 0x1...@googlemail.com on 7 Jun 2013 at 7:07

Attachments:

GoogleCodeExporter commented 9 years ago
That's very strict indeed.
I've fixed this in r1923 together with some other warnings (at least on Mac OS 
X), will be included in a next release.

thanks!

Lieven

Original comment by lieven.govaerts@gmail.com on 9 Jun 2013 at 8:44