suppress warnings (that cause fatal error after all with -W4 used by default build for windows):
C4127 conditional expression is constant
C4189 local variable is initialized but not referenced
C4201 nonstandard extension used : nameless struct/union
C4334 result of 32-bit shift implicitly converted to 64 bits
C4702 unreachable code
disable precompiled header (otherwise it fails since no common precompile header included in brotli files)
Cons: it changes CFLAGS for whole nginx Makefile, so it'd suppress the warnings and disables precompiled header in entire build process of nginx (not ngx_brotli module only) no matter the module added as dynamic or static.
I did not find the way how using auto/module one could set it for brotli-deps files only (if it is possible at all). Another possibility would be to build brotli-deps as a static library in a separate process and link it statically to ngx_brotli module hereafter.
This PR fixes it minimal invasive, similar the tweak with CFLAGS="$CFLAGS -Wno-deprecated-declarations" which has alike effect (just ignores deprecated declarations) for entire build process of nginx. Anyway it works after all.
Suggested PR fixes build of ngx_brotli module for windows with msvc compiler & toolchain.
cl : Command line error D8021 : invalid numeric argument '/Wno-deprecated-declarations'
-W4
used by default build for windows):C4127
conditional expression is constantC4189
local variable is initialized but not referencedC4201
nonstandard extension used : nameless struct/unionC4334
result of 32-bit shift implicitly converted to 64 bitsC4702
unreachable codeCons: it changes
CFLAGS
for whole nginxMakefile
, so it'd suppress the warnings and disables precompiled header in entire build process of nginx (not ngx_brotli module only) no matter the module added as dynamic or static. I did not find the way how usingauto/module
one could set it for brotli-deps files only (if it is possible at all). Another possibility would be to build brotli-deps as a static library in a separate process and link it statically to ngx_brotli module hereafter.This PR fixes it minimal invasive, similar the tweak with
CFLAGS="$CFLAGS -Wno-deprecated-declarations"
which has alike effect (just ignores deprecated declarations) for entire build process of nginx. Anyway it works after all.