[PATCH 1 of 4] Win32: fixed 64-bit compilation with MSVC after 9333:1996ea0bc55d
Maxim Dounin
mdounin at mdounin.ru
Sat May 31 20:23:15 UTC 2025
# HG changeset patch
# User Maxim Dounin <mdounin at mdounin.ru>
# Date 1748666354 -10800
# Sat May 31 07:39:14 2025 +0300
# Node ID 9228d497cb38bd5fda2177380c3eee372a3ddbfd
# Parent d1edde45c5f14fbe5e820a6f3a861c086f3626c5
Win32: fixed 64-bit compilation with MSVC after 9333:1996ea0bc55d.
Compatibility with zlib in LIT_MEM mode added in 9333:1996ea0bc55d triggered
MSVC warning C4334 (result of 32-bit shift implicitly converted to 64 bits),
fixed by adding explicit conversion.
diff --git a/src/http/modules/ngx_http_gzip_filter_module.c b/src/http/modules/ngx_http_gzip_filter_module.c
--- a/src/http/modules/ngx_http_gzip_filter_module.c
+++ b/src/http/modules/ngx_http_gzip_filter_module.c
@@ -520,7 +520,7 @@ ngx_http_gzip_filter_memory(ngx_http_req
* buffer for literals/lengths.
*/
- ctx->allocated += (1 << (memlevel + 6));
+ ctx->allocated += ((ngx_uint_t) 1 << (memlevel + 6));
ctx->zlib_lit_mem = 1;
}
More information about the nginx-devel
mailing list