Enable more optional warnings

-Wformat-truncation is set to 1 instead of 2 because in some cases the
return value of snprintf is used to warn about truncations but GCC still
creates a warning for it, preventing the compilation from continuing.

Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
This commit is contained in:
Antonio Niño Díaz
2018-04-01 01:38:07 +01:00
parent 9829be1045
commit 516e4578ea

View File

@@ -26,7 +26,9 @@ PNGLDLIBS := `${PKG_CONFIG} --static --libs-only-l libpng`
VERSION_STRING := `git describe --tags --dirty --always 2>/dev/null` VERSION_STRING := `git describe --tags --dirty --always 2>/dev/null`
WARNFLAGS := -Werror -Wall -Wextra -Wpedantic -Wno-sign-compare WARNFLAGS := -Werror -Wall -Wextra -Wpedantic -Wno-sign-compare -Wchkp \
-Wformat=2 -Wformat-overflow=2 -Wformat-truncation=1 \
-Wformat-y2k
# Overridable CFLAGS # Overridable CFLAGS
CFLAGS := -g CFLAGS := -g