From 0495f5de265bb6aad4102ea4d926f848ad55acdd Mon Sep 17 00:00:00 2001 From: Quantum Date: Thu, 14 Jan 2021 03:31:12 -0500 Subject: [PATCH] [client] enable useful extra warnings -Wno-sign-compare is used to suppress warnings related to comparing signed values with unsigned ones. It's too pedantic. -Wunused-parameter is also too pedantic, especially since all parameters have to be named in C. Otherwise, -Wextra lets us catch bugs, such as x < 0 for unsigned x. On gcc, we pass -Wimplicit-fallthrough=2 so it will recognize our fall through comment. --- client/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index d1254e25..1b981586 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -41,6 +41,10 @@ add_feature_info(ENABLE_WAYLAND ENABLE_WAYLAND "Wayland support.") add_compile_options( "-Wall" + "-Wextra" + "-Wno-sign-compare" + "-Wno-unused-parameter" + "$<$:-Wimplicit-fallthrough=2>" "-Werror" "-Wfatal-errors" "-ffast-math"