Mercurial > hg > nginx-quic
comparison src/http/modules/ngx_http_memcached_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 | f538a67c9f77 |
children | d80543940f9a |
comparison
equal
deleted
inserted
replaced
5358:670ceaba03d8 | 5359:2fda9065d0f4 |
---|---|
518 if (bytes <= (ssize_t) (u->length - NGX_HTTP_MEMCACHED_END)) { | 518 if (bytes <= (ssize_t) (u->length - NGX_HTTP_MEMCACHED_END)) { |
519 u->length -= bytes; | 519 u->length -= bytes; |
520 return NGX_OK; | 520 return NGX_OK; |
521 } | 521 } |
522 | 522 |
523 last += u->length - NGX_HTTP_MEMCACHED_END; | 523 last += (size_t) (u->length - NGX_HTTP_MEMCACHED_END); |
524 | 524 |
525 if (ngx_strncmp(last, ngx_http_memcached_end, b->last - last) != 0) { | 525 if (ngx_strncmp(last, ngx_http_memcached_end, b->last - last) != 0) { |
526 ngx_log_error(NGX_LOG_ERR, ctx->request->connection->log, 0, | 526 ngx_log_error(NGX_LOG_ERR, ctx->request->connection->log, 0, |
527 "memcached sent invalid trailer"); | 527 "memcached sent invalid trailer"); |
528 | 528 |