Mercurial > hg > nginx
comparison src/http/ngx_http_file_cache.c @ 6860:f18c285c2e59
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().
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Sat, 24 Dec 2016 18:01:14 +0300 |
parents | 1a917932db96 |
children | 9a9e13686869 |
comparison
equal
deleted
inserted
replaced
6859:38df52d4e250 | 6860:f18c285c2e59 |
---|---|
551 ngx_log_error(NGX_LOG_INFO, r->connection->log, 0, | 551 ngx_log_error(NGX_LOG_INFO, r->connection->log, 0, |
552 "cache file \"%s\" version mismatch", c->file.name.data); | 552 "cache file \"%s\" version mismatch", c->file.name.data); |
553 return NGX_DECLINED; | 553 return NGX_DECLINED; |
554 } | 554 } |
555 | 555 |
556 if (h->crc32 != c->crc32 || h->header_start != c->header_start) { | 556 if (h->crc32 != c->crc32 || (size_t) h->header_start != c->header_start) { |
557 ngx_log_error(NGX_LOG_CRIT, r->connection->log, 0, | 557 ngx_log_error(NGX_LOG_CRIT, r->connection->log, 0, |
558 "cache file \"%s\" has md5 collision", c->file.name.data); | 558 "cache file \"%s\" has md5 collision", c->file.name.data); |
559 return NGX_DECLINED; | 559 return NGX_DECLINED; |
560 } | 560 } |
561 | 561 |
1493 } | 1493 } |
1494 | 1494 |
1495 if (h.version != NGX_HTTP_CACHE_VERSION | 1495 if (h.version != NGX_HTTP_CACHE_VERSION |
1496 || h.last_modified != c->last_modified | 1496 || h.last_modified != c->last_modified |
1497 || h.crc32 != c->crc32 | 1497 || h.crc32 != c->crc32 |
1498 || h.header_start != c->header_start | 1498 || (size_t) h.header_start != c->header_start |
1499 || h.body_start != c->body_start) | 1499 || (size_t) h.body_start != c->body_start) |
1500 { | 1500 { |
1501 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, | 1501 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, |
1502 "http file cache \"%s\" content changed", | 1502 "http file cache \"%s\" content changed", |
1503 file.name.data); | 1503 file.name.data); |
1504 goto done; | 1504 goto done; |