From 973748f3210a4bc749a70155c4df7f501b865d2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Valverde?= Date: Thu, 17 Nov 2022 09:50:36 +0000 Subject: [PATCH] CMake: Cleanup some compiler flags Enable -Qunused-arguments because it may be a useful warning. Remove -fwrapv because it is implied by -fno-strict-overflow. Move GCC-specific flag out of if(GCC) condition. Let CMake enable it automatically. --- CMakeLists.txt | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c400c895b01..05faf673261 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -616,19 +616,6 @@ else() # ! MSVC endif() endif() - if(CMAKE_C_COMPILER_ID MATCHES "Clang") - set(WIRESHARK_COMMON_FLAGS ${WIRESHARK_COMMON_FLAGS} - # avoid "argument unused during compilation" warnings - # (for example, when getting the -gsplit-dwarf option or - # when combining -fwrapv with -fno-strict-overflow) - -Qunused-arguments - ) - else() - set(WIRESHARK_COMMON_FLAGS ${WIRESHARK_COMMON_FLAGS} - -fexcess-precision=fast - ) - endif() - list(APPEND WIRESHARK_COMMON_FLAGS # The following are for C and C++ # -O and -g get set by the CMAKE_BUILD_TYPE @@ -636,8 +623,8 @@ else() # ! MSVC -Wextra -Wpointer-arith -Wformat-security - -fwrapv -fno-strict-overflow + -fexcess-precision=fast # GCC-only -Wvla -Wattributes -Wpragmas # Clang-only