1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-11-06 08:49:29 +02:00

Suppress implicit-fallthrough warning.

Warning on missing breaks in switch statements works great until it is intended.

Suppressing on a case by case basis varies by compiler and version so is not very practical. Our tests should be sufficient to the task of finding missing breaks.
This commit is contained in:
David Steele
2021-02-28 17:27:48 -05:00
parent a1341b4af0
commit 0766b7e524
2 changed files with 3 additions and 3 deletions

View File

@@ -42,7 +42,7 @@ AC_LINK_IFELSE(
# Set warnings and optimizations based on build type (i.e. production or test)
# ----------------------------------------------------------------------------------------------------------------------------------
AC_SUBST(CFLAGS, "${CFLAGS} -Wall -Wextra -Wno-missing-field-initializers")
AC_SUBST(CFLAGS, "${CFLAGS} -Wall -Wextra -Wno-missing-field-initializers -Wno-implicit-fallthrough")
# -Wno-clobbered is not supported on all compilers
AX_CHECK_COMPILE_FLAG([-Wno-clobbered], [AC_SUBST(CFLAGS, "${CFLAGS} -Wno-clobbered")], [], [-Werror])

4
src/configure vendored
View File

@@ -3176,7 +3176,7 @@ rm -f core conftest.err conftest.$ac_objext \
# Set warnings and optimizations based on build type (i.e. production or test)
# ----------------------------------------------------------------------------------------------------------------------------------
CFLAGS="${CFLAGS} -Wall -Wextra -Wno-missing-field-initializers"
CFLAGS="${CFLAGS} -Wall -Wextra -Wno-missing-field-initializers -Wno-implicit-fallthrough"
# -Wno-clobbered is not supported on all compilers
@@ -5609,4 +5609,4 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
# Generated from src/build/configure.ac sha1 ec5b8676addeca8533091a1cc8a3d12005667a6d
# Generated from src/build/configure.ac sha1 61f1b4aec11fa131a5fc0da0e5a34dcc75ac0b82