comparison 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
comparison
equal deleted inserted replaced
6859:38df52d4e250 6860:f18c285c2e59
643 643
644 /* a potential match */ 644 /* a potential match */
645 645
646 start = offset - (ngx_int_t) tables->min_match_len + 1; 646 start = offset - (ngx_int_t) tables->min_match_len + 1;
647 647
648 i = ngx_max(tables->index[c], ctx->index); 648 i = ngx_max((ngx_uint_t) tables->index[c], ctx->index);
649 j = tables->index[c + 1]; 649 j = tables->index[c + 1];
650 650
651 while (i != j) { 651 while (i != j) {
652 652
653 if (slcf->once && ctx->sub && ctx->sub[i].data) { 653 if (slcf->once && ctx->sub && ctx->sub[i].data) {
976 c = match[i].match.data[tables->min_match_len - 1 - j]; 976 c = match[i].match.data[tables->min_match_len - 1 - j];
977 tables->shift[c] = ngx_min(tables->shift[c], (u_char) j); 977 tables->shift[c] = ngx_min(tables->shift[c], (u_char) j);
978 } 978 }
979 979
980 c = match[i].match.data[tables->min_match_len - 1]; 980 c = match[i].match.data[tables->min_match_len - 1];
981 while (ch <= c) { 981 while (ch <= (ngx_uint_t) c) {
982 tables->index[ch++] = (u_char) i; 982 tables->index[ch++] = (u_char) i;
983 } 983 }
984 } 984 }
985 985
986 while (ch < 257) { 986 while (ch < 257) {