From 22f9bc5260160248ef0738d73f5b8857e3bc6d74 Mon Sep 17 00:00:00 2001 From: Stefan Rueger Date: Thu, 12 Jan 2023 00:01:46 +0000 Subject: [PATCH] Enable -Wextra -Wno-unused-parameter by default for gcc --- src/CMakeLists.txt | 2 +- src/configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c51214e6..bb281b70 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -77,7 +77,7 @@ if(MSVC) ) else() set(LIB_MATH m) - add_compile_options(-Wall) # -Wextra + add_compile_options(-Wall -Wextra -Wno-unused-parameter) endif() # ===================================== diff --git a/src/configure.ac b/src/configure.ac index b57af4a6..de507461 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -429,7 +429,7 @@ fi # If we are compiling with gcc, enable all warnings and make warnings errors. if test "$GCC" = yes; then - ENABLE_WARNINGS="-Wall" + ENABLE_WARNINGS="-Wall -Wextra -Wno-unused-parameter" # does this compiler support -Wno-pointer-sign ? AC_MSG_CHECKING([if gcc accepts -Wno-pointer-sign ])