Mercurial > hg > nginx
comparison 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 |
comparison
equal
deleted
inserted
replaced
5358:670ceaba03d8 | 5359:2fda9065d0f4 |
---|---|
1710 ngx_log_debug2(NGX_LOG_DEBUG_EVENT, p->log, 0, | 1710 ngx_log_debug2(NGX_LOG_DEBUG_EVENT, p->log, 0, |
1711 "input buf #%d %p", b->num, b->pos); | 1711 "input buf #%d %p", b->num, b->pos); |
1712 | 1712 |
1713 if (buf->last - buf->pos >= ctx->chunked.size) { | 1713 if (buf->last - buf->pos >= ctx->chunked.size) { |
1714 | 1714 |
1715 buf->pos += ctx->chunked.size; | 1715 buf->pos += (size_t) ctx->chunked.size; |
1716 b->last = buf->pos; | 1716 b->last = buf->pos; |
1717 ctx->chunked.size = 0; | 1717 ctx->chunked.size = 0; |
1718 | 1718 |
1719 continue; | 1719 continue; |
1720 } | 1720 } |
1873 | 1873 |
1874 b->pos = buf->pos; | 1874 b->pos = buf->pos; |
1875 b->tag = u->output.tag; | 1875 b->tag = u->output.tag; |
1876 | 1876 |
1877 if (buf->last - buf->pos >= ctx->chunked.size) { | 1877 if (buf->last - buf->pos >= ctx->chunked.size) { |
1878 buf->pos += ctx->chunked.size; | 1878 buf->pos += (size_t) ctx->chunked.size; |
1879 b->last = buf->pos; | 1879 b->last = buf->pos; |
1880 ctx->chunked.size = 0; | 1880 ctx->chunked.size = 0; |
1881 | 1881 |
1882 } else { | 1882 } else { |
1883 ctx->chunked.size -= buf->last - buf->pos; | 1883 ctx->chunked.size -= buf->last - buf->pos; |