You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Cliff Woolley <cl...@yahoo.com> on 2000/10/21 22:26:52 UTC

[PATCH] clean up warnings in http_core.c

This cleans up a few warnings about incompatible pointer types in http_core.c.

--Cliff


Index: http_core.c
===================================================================
RCS file: /home/cvspublic/apache-2.0/src/main/http_core.c,v
retrieving revision 1.181
diff -u -r1.181 http_core.c
--- http_core.c	2000/10/21 14:20:14	1.181
+++ http_core.c	2000/10/21 20:20:49
@@ -2564,7 +2564,7 @@
 #endif
 
 static apr_status_t writev_it_all(apr_socket_t *s, struct iovec *vec, int nvec, 
-                                  apr_size_t len, apr_size_t *nbytes)
+                                  apr_ssize_t len, apr_ssize_t *nbytes)
 {
     apr_size_t bytes_written = 0;
     apr_status_t rv;
@@ -2610,12 +2610,12 @@
  */
 static apr_status_t send_the_file(conn_rec *c, apr_file_t *fd, 
                                   apr_hdtr_t *hdtr, apr_off_t offset, 
-                                  apr_size_t length, apr_size_t *nbytes) 
+                                  apr_ssize_t length, apr_ssize_t *nbytes) 
 {
     apr_status_t rv = APR_SUCCESS;
     apr_int32_t togo;         /* Remaining number of bytes in the file to send */
-    apr_size_t sendlen = 0;
-    apr_size_t bytes_sent;
+    apr_ssize_t sendlen = 0;
+    apr_ssize_t bytes_sent;
     apr_int32_t i;
     apr_off_t o;              /* Track the file offset for partial writes */
     char buffer[8192];


__________________________________________________
Do You Yahoo!?
Yahoo! Messenger - Talk while you surf!  It's FREE.
http://im.yahoo.com/

Re: [PATCH] clean up warnings in http_core.c

Posted by Jeff Trawick <tr...@bellsouth.net>.
Cliff Woolley <cl...@yahoo.com> writes:

> This cleans up a few warnings about incompatible pointer types in http_core.c.
> 
> --Cliff

I noticed these warnings on OS/390 yesterday, and there was your
lovely patch.  I just committed it.

I also noticed that we have the same issue in http_core.c with the use
of apr_sendfile().  Making the len parameter to apr_sendfile()
apr_ssize_t* instead of apr_size_t* should resolve the issue nicely
and improve consistency among similar parameters in other APR
routines.
-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...