mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
build: drop the -Wswitch-enum warning
-Wswitch-enum is a bit awkward if a switch statement is intended to handle just some of the named codes of an enumeration especially, and leave the rest to the default label. We already have -Wall, which enables -Wswitch by default, and per GCC documentation, "The only difference between -Wswitch and this option [-Wswitch-enum] is that this option gives a warning about an omitted enumeration code even if there is a default label." Drop -Wswitch-enum to not force listing all named codes of enumerations in switch statements that have a default label.
This commit is contained in:
parent
42391b4056
commit
c158201ee2
1 changed files with 1 additions and 1 deletions
2
configure
vendored
2
configure
vendored
|
@ -536,7 +536,7 @@ fi
|
|||
|
||||
WARN_CXXFLAGS=""
|
||||
printf "Checking for available C++ compiler warning flags... "
|
||||
for flag in -Wall -Wextra -Wwrite-strings -Wswitch-enum; do
|
||||
for flag in -Wall -Wextra -Wwrite-strings; do
|
||||
if ${CC} $flag -o minimal minimal.c > /dev/null 2>&1
|
||||
then
|
||||
WARN_CXXFLAGS="${WARN_CXXFLAGS}${WARN_CXXFLAGS:+ }${flag}"
|
||||
|
|
Loading…
Reference in a new issue