httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pt...@pobox.com
Subject [PATCH] flood: Fixed compiler warning about signed/unsigned mismatch in generic_recv_resp()
Date Tue, 11 Feb 2003 10:27:01 GMT
Here's a minor patch for a compiler warning.  I'll going to send a patch that
touches flood_socket_generic.c soon, so I figured it would be a good thing
to address the warning first.

Summary:
     Fixed compiler warning about signed/unsigned mismatch in generic_recv_resp
()

This patch addresses the following compiler warning generated by the
Visual C++ 6 compiler:

flood_socket_generic.c(161) : warning C4018: '>' : signed/unsigned mismatch

We have two local variables declared as integers used in an expression
involving an unsigned type.  I changed the variable declarations to
match the unsigned type to address the warning.  All three variables
involved deal with memory sizes using apr_size_t, so it's safe to
change the declarations.

Index: flood_socket_generic.c
===================================================================
RCS file: /home/cvspublic/httpd-test/flood/flood_socket_generic.c,v
retrieving revision 1.8
diff -u -r1.8 flood_socket_generic.c
--- flood_socket_generic.c	3 Feb 2003 17:10:56 -0000	1.8
+++ flood_socket_generic.c	8 Feb 2003 02:40:31 -0000
@@ -134,7 +134,7 @@
 apr_status_t generic_recv_resp(response_t **resp, socket_t *sock, apr_pool_t *
pool)
 {
     char b[MAX_DOC_LENGTH];
-    int i;
+    apr_size_t i;
     response_t *new_resp;
     apr_status_t status;
 
@@ -146,7 +146,7 @@
     if (gsock->wantresponse)
     {
         /* Ugh, we want everything. */
-        int currentalloc;
+        apr_size_t currentalloc;
         char *cp, *op;
 
         new_resp->rbufsize = 0;


Mime
View raw message