CMake + Gitlab CI: Allow fuzz jobs to pass with warnings

Allow fuzz jobs to pass with warnings because catching warnings is
not their purpose.

Remove -Werror=unused-but-set-variable that was added in
85357ae721 as a work-around to the fact that -Werror is not
enabled as a side-effect of ENABLE_EXTRA_COMPILER_WARNINGS.

Allow users to control -Werror. For example the MSYS2 build
has many warnings, this policy of adding -Werror= breaks that
build.
This commit is contained in:
João Valverde 2022-11-11 14:12:14 +00:00
parent 384bf49591
commit 1ed750dd94
2 changed files with 3 additions and 9 deletions

View File

@ -826,7 +826,7 @@ ASan Menagerie Fuzz:
script:
- MAX_SECONDS=$(( 4 * 60 * 60 ))
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
- cmake -G Ninja -DBUILD_wireshark=OFF -DCMAKE_BUILD_TYPE=Debug -DENABLE_ASAN=ON -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX -DENABLE_CCACHE=ON ..
- cmake -G Ninja -DBUILD_wireshark=OFF -DCMAKE_BUILD_TYPE=Debug -DENABLE_ASAN=ON -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX -DENABLE_CCACHE=ON -DENABLE_WERROR=Off ..
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
- ninja
- ninja install
@ -841,7 +841,7 @@ ASan randpkt Fuzz:
script:
# XXX Reuse fuzz-asan?
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
- cmake -G Ninja -DBUILD_wireshark=OFF -DCMAKE_BUILD_TYPE=Debug -DENABLE_ASAN=ON -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX -DENABLE_CCACHE=ON ..
- cmake -G Ninja -DBUILD_wireshark=OFF -DCMAKE_BUILD_TYPE=Debug -DENABLE_ASAN=ON -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX -DENABLE_CCACHE=ON -DENABLE_WERROR=Off ..
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
- ninja
- ninja install
@ -862,7 +862,7 @@ Valgrind Menagerie Fuzz:
- DEBIAN_FRONTEND=noninteractive apt-get --yes install valgrind
- MAX_SECONDS=$(( 3 * 60 * 60 ))
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
- cmake -G Ninja -DBUILD_wireshark=OFF -DCMAKE_BUILD_TYPE=Debug -DENABLE_ASAN=OFF -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX -DENABLE_CCACHE=ON ..
- cmake -G Ninja -DBUILD_wireshark=OFF -DCMAKE_BUILD_TYPE=Debug -DENABLE_ASAN=OFF -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX -DENABLE_CCACHE=ON -DENABLE_WERROR=Off ..
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
- ninja
- ninja install

View File

@ -676,12 +676,6 @@ else() # ! MSVC
# code should not introduce new deprecations in any case.
#
-Wno-error=deprecated-declarations
#
# GCC < 6.0 had issues with false positives, but current versions
# and clang appear to be OK.
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66543
#
-Werror=unused-but-set-variable
)
#