Skip to content

Commit

Permalink
CMake + Gitlab CI: Allow fuzz jobs to pass with warnings
Browse files Browse the repository at this point in the history
Allow fuzz jobs to pass with warnings because catching warnings is
not their purpose.

Remove -Werror=unused-but-set-variable that was added in
85357ae 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.
  • Loading branch information
randstr committed Nov 11, 2022
1 parent 384bf49 commit 1ed750d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
6 changes: 0 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

#
Expand Down

0 comments on commit 1ed750d

Please sign in to comment.