nginx-0.3.53

Igor Sysoev is at rambler-co.ru
Sat Jul 8 11:03:51 MSD 2006


On Sat, 8 Jul 2006, Yusuf Goolamabbas wrote:

> compilation fails with the following on Centos 4.3/x86-64
>
> ./configure --prefix=/usr/local/site/nginx --with-cc-opt=-"I
> /usr/include/pcre" --with-ld-opt="-L/usr/lib64 -L/lib64"
>
> gcc -c -O -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter
> -Wno-unused-function -Wunused-variable -Wunused-value -Werror -g -I
> /usr/include/pcre -I src/core -I src/event -I src/event/modules -I
> src/os/unix -I objs -I src/http -I src/http/modules \
>       -o objs/src/http/ngx_http_request_body.o \
>       src/http/ngx_http_request_body.c
>
> src/http/ngx_http_request_body.c: In function
> `ngx_http_read_client_request_body':
> src/http/ngx_http_request_body.c:95: warning: comparison between
> signed and unsigned
> src/http/ngx_http_request_body.c:123: warning: comparison between
> signed and unsigned
> src/http/ngx_http_request_body.c: In function
> `ngx_http_do_read_client_request_body':
> src/http/ngx_http_request_body.c:245: warning: comparison between
> signed and unsigned
> make[1]: *** [objs/src/http/ngx_http_request_body.o] Error 1
>
> make: *** [build] Error 2

The patch.


Igor Sysoev
http://sysoev.ru/en/
-------------- next part --------------
--- src/http/ngx_http_request_body.c	Fri Jul  7 17:34:30 2006
+++ src/http/ngx_http_request_body.c	Sat Jul  8 09:37:55 2006
@@ -92,7 +92,7 @@
         rb->bufs->buf = b;
         rb->bufs->next = NULL;
 
-        if (preread >= r->headers_in.content_length_n) {
+        if ((off_t) preread >= r->headers_in.content_length_n) {
 
             /* the whole request body was pre-read */
 
@@ -120,7 +120,7 @@
 
         rb->rest = r->headers_in.content_length_n - preread;
 
-        if (rb->rest <= (size_t) (b->end - b->last)) {
+        if (rb->rest <= (off_t) (b->end - b->last)) {
 
             /* the whole request body may be placed in r->header_in */
 
@@ -242,7 +242,7 @@
 
         size = rb->buf->end - rb->buf->last;
 
-        if (size > rb->rest) {
+        if ((off_t) size > rb->rest) {
             size = (size_t) rb->rest;
         }
 


More information about the nginx mailing list