From 516e4578ea144e297e69ac7972e639b67a17b387 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ni=C3=B1o=20D=C3=ADaz?= Date: Sun, 1 Apr 2018 01:38:07 +0100 Subject: [PATCH] Enable more optional warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -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 --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0964a45e..75f18e60 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,9 @@ PNGLDLIBS := `${PKG_CONFIG} --static --libs-only-l libpng` 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 CFLAGS := -g