diff src/http/modules/ngx_http_sub_filter_module.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 f379b32e4733
children 201038680680
line wrap: on
line diff
--- a/src/http/modules/ngx_http_sub_filter_module.c
+++ b/src/http/modules/ngx_http_sub_filter_module.c
@@ -645,7 +645,7 @@ ngx_http_sub_parse(ngx_http_request_t *r
 
         start = offset - (ngx_int_t) tables->min_match_len + 1;
 
-        i = ngx_max(tables->index[c], ctx->index);
+        i = ngx_max((ngx_uint_t) tables->index[c], ctx->index);
         j = tables->index[c + 1];
 
         while (i != j) {
@@ -978,7 +978,7 @@ ngx_http_sub_init_tables(ngx_http_sub_ta
         }
 
         c = match[i].match.data[tables->min_match_len - 1];
-        while (ch <= c) {
+        while (ch <= (ngx_uint_t) c) {
             tables->index[ch++] = (u_char) i;
         }
     }