Compilation error on macOS with 3.36.2 in debug mode
Hi,
Just giving the meson build system a try with 3.36.2 (mostly because configure is not included and autoreconf is giving errors):
clang -Icut-n-paste/unarr/a2e3a9b@@unarr@sta -Icut-n-paste/unarr -I../cut-n-paste/unarr -Xclang -fcolor-diagnostics -pipe -Wall -Winvalid-pch -O2 -g -DHAVE_CONFIG_H -DEV_ENABLE_DEBUG -Wnested-externs -Wstrict-prototypes -Werror=format=2 -Werror=implicit-function-declaration -Werror=init-self -Werror=missing-include-dirs -Werror=missing-prototypes -Werror=pointer-arith -Werror=return-type -DHAVE_ZLIB -DNDEBUG -MD -MQ 'cut-n-paste/unarr/a2e3a9b@@unarr@sta/common_unarr.c.o' -MF 'cut-n-paste/unarr/a2e3a9b@@unarr@sta/common_unarr.c.o.d' -o 'cut-n-paste/unarr/a2e3a9b@@unarr@sta/common_unarr.c.o' -c ../cut-n-paste/unarr/common/unarr.c
../cut-n-paste/unarr/common/unarr.c:106:22: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
vfprintf(stderr, msg, args);
^~~
1 error generated.
clang -Icut-n-paste/synctex/9b37a5f@@synctex@sta -Icut-n-paste/synctex -I../cut-n-paste/synctex -I. -I.. -Xclang -fcolor-diagnostics -pipe -Wall -Winvalid-pch -O2 -g -DHAVE_CONFIG_H -DEV_ENABLE_DEBUG -Wnested-externs -Wstrict-prototypes -Werror=format=2 -Werror=implicit-function-declaration -Werror=init-self -Werror=missing-include-dirs -Werror=missing-prototypes -Werror=pointer-arith -Werror=return-type -DSYNCTEX_VERBOSE=0 -MD -MQ 'cut-n-paste/synctex/9b37a5f@@synctex@sta/synctex_parser.c.o' -MF 'cut-n-paste/synctex/9b37a5f@@synctex@sta/synctex_parser.c.o.d' -o 'cut-n-paste/synctex/9b37a5f@@synctex@sta/synctex_parser.c.o' -c ../cut-n-paste/synctex/synctex_parser.c
../cut-n-paste/synctex/synctex_parser.c:8420:28: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
format,
^~~~~~
../cut-n-paste/synctex/synctex_parser.c:8456:32: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
if (vasprintf(&buffer, format, va) < 0) {
^~~~~~
2 errors generated.
The errors go away with --buildtype=plain
, but I think this should be addressed since this is indeed problematic code, and will probably cause trouble for the Linux distro packagers as well as they tend to enforce these flags.