apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r395223 - /apr/apr-util/trunk/buckets/apr_brigade.c
Date Wed, 19 Apr 2006 11:47:27 GMT
Author: jorton
Date: Wed Apr 19 04:47:23 2006
New Revision: 395223

URL: http://svn.apache.org/viewcvs?rev=395223&view=rev
Log:
* buckets/apr_brigade.c (apr_brigade_to_iovec): Fix strict-aliasing
warning with gcc 4.1.

Modified:
    apr/apr-util/trunk/buckets/apr_brigade.c

Modified: apr/apr-util/trunk/buckets/apr_brigade.c
URL: http://svn.apache.org/viewcvs/apr/apr-util/trunk/buckets/apr_brigade.c?rev=395223&r1=395222&r2=395223&view=diff
==============================================================================
--- apr/apr-util/trunk/buckets/apr_brigade.c (original)
+++ apr/apr-util/trunk/buckets/apr_brigade.c Wed Apr 19 04:47:23 2006
@@ -323,6 +323,7 @@
     apr_bucket *e;
     struct iovec *orig;
     apr_size_t iov_len;
+    const char *iov_base;
     apr_status_t rv;
 
     orig = vec;
@@ -334,11 +335,12 @@
         if (left-- == 0)
             break;
 
-        rv = apr_bucket_read(e, (const char **)&vec->iov_base, &iov_len,
-                             APR_NONBLOCK_READ);
+        rv = apr_bucket_read(e, &iov_base, &iov_len, APR_NONBLOCK_READ);
         if (rv != APR_SUCCESS)
             return rv;
-        vec->iov_len = iov_len; /* set indirectly in case size differs */
+        /* Set indirectly since types differ: */
+        vec->iov_len = iov_len;
+        vec->iov_base = (void *)iov_base;
         ++vec;
     }
 



Mime
View raw message