Closed pmqs closed 5 years ago
Confirmed warning
perl5.26.1 Makefile.PL CCFLAGS=' -Wall -Wimplicit-fallthrough -Wmultistatement-macros -Werror=declaration-after-statement -Wextra -Wc++-compat -Wwrite-strings' && make
...
gcc-8 -c -I./zlib-src -Wall -Werror=declaration-after-statement -Wextra -Wc++-compat -Wwrite-strings -Wcast-function-type -Wimplicit-fallthrough -Wmultistatement-macros -Wunused-but-set-variable -Wunused-parameter -Wunused-variable -O2 -DVERSION=\"2.090\" -DXS_VERSION=\"2.090\" -fPIC "-I/home/paul/base/install/gcc-8/perl/std/5.26.1/lib/5.26.1/x86_64-linux/CORE" -DNO_VIZ -DZ_SOLO -DGZIP_OS_CODE=3 -DUSE_PPPORT_H deflate.c
deflate.c: In function ‘deflateParams’:
deflate.c:602:28: warning: macro expands to multiple statements [-Wmultistatement-macros]
CLEAR_HASH(s);
^
deflate.c:193:5: note: in definition of macro ‘CLEAR_HASH’
s->head[s->hash_size-1] = NIL; \
^
deflate.c:601:13: note: some parts of macro expansion are not guarded by this ‘else’ clause
else
^~~~
Issue fixed in 2.091 Changes da2bd1fc765b80d01ed10a79b6c4a035e5095ed8
Perl/perl5#17013 notes this warning
This is the macro in question
Upstream zlib has fixed this issue in https://github.com/madler/zlib/commit/38e8ce32afbaa82f67d992b9f3056f281fe69259.