diff src/http/modules/ngx_http_proxy_module.c @ 5359:2fda9065d0f4

Win32: Borland C compatibility fixes. Several false positive warnings silenced, notably W8012 "Comparing signed and unsigned" (due to u_short values promoted to int), and W8072 "Suspicious pointer arithmetic" (due to large type values added to pointers). With this patch, it's now again possible to compile nginx using bcc32, with options we normally compile on win32 minus ipv6 and ssl.
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 04 Sep 2013 20:48:23 +0400
parents a50e26148d21
children 7c1f4977d8a0
line wrap: on
line diff
--- a/src/http/modules/ngx_http_proxy_module.c
+++ b/src/http/modules/ngx_http_proxy_module.c
@@ -1712,7 +1712,7 @@ ngx_http_proxy_chunked_filter(ngx_event_
 
             if (buf->last - buf->pos >= ctx->chunked.size) {
 
-                buf->pos += ctx->chunked.size;
+                buf->pos += (size_t) ctx->chunked.size;
                 b->last = buf->pos;
                 ctx->chunked.size = 0;
 
@@ -1875,7 +1875,7 @@ ngx_http_proxy_non_buffered_chunked_filt
             b->tag = u->output.tag;
 
             if (buf->last - buf->pos >= ctx->chunked.size) {
-                buf->pos += ctx->chunked.size;
+                buf->pos += (size_t) ctx->chunked.size;
                 b->last = buf->pos;
                 ctx->chunked.size = 0;