aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_file_cache.c
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2016-12-24 18:01:14 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2016-12-24 18:01:14 +0300
commitc17009ee756bf16e702ed48ef667765c121e36d6 (patch)
treec8f74895ac97264625ba4c3ded5f1e4a931bf5e9 /src/http/ngx_http_file_cache.c
parenta43b2c96b20aa675601c43785397aabd8335a891 (diff)
downloadnginx-c17009ee756bf16e702ed48ef667765c121e36d6.tar.gz
nginx-c17009ee756bf16e702ed48ef667765c121e36d6.zip
Win32: fixed some warnings reported by Borland C.
Most notably, warning W8012 (comparing signed and unsigned values) reported in multiple places where an unsigned value of small type (e.g., u_short) is promoted to an int and compared to an unsigned value. Warning W8072 (suspicious pointer arithmetic) disabled, it is reported when we increment base pointer in ngx_shm_alloc().
Diffstat (limited to 'src/http/ngx_http_file_cache.c')
-rw-r--r--src/http/ngx_http_file_cache.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/http/ngx_http_file_cache.c b/src/http/ngx_http_file_cache.c
index 3c8ad7dab..a5a9300ac 100644
--- a/src/http/ngx_http_file_cache.c
+++ b/src/http/ngx_http_file_cache.c
@@ -553,7 +553,7 @@ ngx_http_file_cache_read(ngx_http_request_t *r, ngx_http_cache_t *c)
return NGX_DECLINED;
}
- if (h->crc32 != c->crc32 || h->header_start != c->header_start) {
+ if (h->crc32 != c->crc32 || (size_t) h->header_start != c->header_start) {
ngx_log_error(NGX_LOG_CRIT, r->connection->log, 0,
"cache file \"%s\" has md5 collision", c->file.name.data);
return NGX_DECLINED;
@@ -1495,8 +1495,8 @@ ngx_http_file_cache_update_header(ngx_http_request_t *r)
if (h.version != NGX_HTTP_CACHE_VERSION
|| h.last_modified != c->last_modified
|| h.crc32 != c->crc32
- || h.header_start != c->header_start
- || h.body_start != c->body_start)
+ || (size_t) h.header_start != c->header_start
+ || (size_t) h.body_start != c->body_start)
{
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
"http file cache \"%s\" content changed",