diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2e980e802a3..2b075690a61 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -540,7 +540,7 @@ Code Checks + Clang Warnings: - cd build - printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)" # We don't have an "All options" job, so build fuzzshark and tfshark here. - - cmake -DENABLE_EXTRA_COMPILER_WARNINGS=on -DENABLE_CHECKHF_CONFLICT=on -DCMAKE_EXPORT_COMPILE_COMMANDS=on -DBUILD_fuzzshark=ON -DBUILD_tfshark=On -DBUILD_logray=ON -DENABLE_CCACHE=ON -G Ninja .. + - cmake -DENABLE_EXTRA_COMPILER_WARNINGS=on -DENABLE_WERROR=off -DENABLE_CHECKHF_CONFLICT=on -DCMAKE_EXPORT_COMPILE_COMMANDS=on -DBUILD_fuzzshark=ON -DBUILD_tfshark=On -DBUILD_logray=ON -DENABLE_CCACHE=ON -G Ninja .. - printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)" - mkdir ../html - script --command ninja --flush --quiet --return ../tmp_clang_report.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 05faf673261..a0b8be2571d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -718,7 +718,7 @@ else() # ! MSVC # These are not enabled by default, because the warnings they # produce are very hard or impossible to eliminate. # - if(ENABLE_EXTRA_COMPILER_WARNINGS) # This overrides -Werror + if(ENABLE_EXTRA_COMPILER_WARNINGS) list(APPEND WIRESHARK_COMMON_FLAGS # The following are for C and C++ -Wpedantic @@ -963,7 +963,7 @@ if(MSVC) endif() set(WERROR_COMMON_FLAGS "") -if(ENABLE_WERROR AND NOT ENABLE_EXTRA_COMPILER_WARNINGS) +if(ENABLE_WERROR) if(CMAKE_C_COMPILER_ID MATCHES "MSVC") set(WERROR_COMMON_FLAGS "/WX") else() diff --git a/CMakeOptions.txt b/CMakeOptions.txt index a3c57322d8a..38ad3896fac 100644 --- a/CMakeOptions.txt +++ b/CMakeOptions.txt @@ -59,7 +59,7 @@ option(ENABLE_DEBUG_MBS "Enable extra debug checks for detecting invalid multib option(ENABLE_CCACHE "Speed up compiling and linking using ccache if possible" OFF) option(DISABLE_FRAME_LARGER_THAN_WARNING "Disable warning if the size of a function frame is large" OFF) option(EXTCAP_ANDROIDDUMP_LIBPCAP "Build androiddump using libpcap" OFF) -option(ENABLE_EXTRA_COMPILER_WARNINGS "Do additional compiler warnings (disables -Werror)" OFF) +option(ENABLE_EXTRA_COMPILER_WARNINGS "Do additional compiler warnings (noisy)" OFF) option(ENABLE_CODE_ANALYSIS "Enable the compiler's static analyzer if possible" OFF) option(ENABLE_ASAN "Enable AddressSanitizer (ASAN) for debugging (degrades performance)" OFF) option(ENABLE_TSAN "Enable ThreadSanitizer (TSan) for debugging" OFF)