From d7c8b7e16e93375d46dbb5771c92bbc335361b1b Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 20 Oct 2020 05:52:29 +0200 Subject: cmake: Add warning (=error): -Wshadow -Wtype-limits -Wsign-compare --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index d12cefe..3369f57 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,10 @@ set (CMAKE_CXX_STANDARD_REQUIRED ON) # for all set (CC_FLAGS_WARNING "-Wall -Wextra -Werror") set (GCC_FLAGS_WARNING_FORMAT "-Wformat=2 -Wformat-overflow=2 -Wformat-nonliteral -Wformat-security -Wformat-signedness -Wformat-y2k") -set (GCC_FLAGS_WARNING "-Wall -Wextra -Wcast-align=strict -Wnull-dereference -Winit-self ${GCC_FLAGS_WARNING_FORMAT} -Werror") +set (GCC_FLAGS_WARNING "-Wall -Wextra -Wshadow -Wtype-limits -Wsign-compare -Wcast-align=strict -Wnull-dereference -Winit-self ${GCC_FLAGS_WARNING_FORMAT} -Werror") + +# too pedantic, but nice to check once in a while +# set (DISABLED_CC_FLAGS_WARNING "-Wsign-conversion") # debug only set (GCC_FLAGS_STACK "-fstack-protector-strong -fstack-check") -- cgit v1.2.3