From 29571ce73abfd7b59311baf835cba78b743368ec Mon Sep 17 00:00:00 2001 From: def Date: Sun, 20 Mar 2022 13:06:33 +0100 Subject: [PATCH] Also document why we don't use some other useful warnings From https://kristerw.blogspot.com/2017/09/useful-gcc-warning-options-not-enabled.html --- CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c37c9ad67..17804c584 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -244,10 +244,11 @@ if(NOT MSVC AND NOT HAIKU) add_c_compiler_flag_if_supported(OUR_FLAGS_OWN -Wduplicated-branches) add_c_compiler_flag_if_supported(OUR_FLAGS_OWN -Wlogical-op) add_c_compiler_flag_if_supported(OUR_FLAGS_OWN -Wrestrict) - add_c_compiler_flag_if_supported(OUR_FLAGS_OWN -Wshadow=local) + add_c_compiler_flag_if_supported(OUR_FLAGS_OWN -Wshadow=local) # global has too many occurences add_c_compiler_flag_if_supported(OUR_FLAGS_OWN -Wthread-safety) - # TODO: Enable for C++ code except gtest - #add_cxx_compiler_flag_if_supported(OUR_FLAGS_OWN "-Wuseless-cast") + # add_c_compiler_flag_if_supported(OUR_FLAGS_OWN -Wdouble-promotion) # Many occurences + # add_c_compiler_flag_if_supported(OUR_FLAGS_OWN -Wnull-dereference) # Many occurences + # add_c_compiler_flag_if_supported(OUR_FLAGS_OWN -Wuseless-cast) # TODO: Enable for C++ code except gtest endif() if(MSVC)