From 0766b7e524f62c00d61d5588ef1491bbcccaf9a0 Mon Sep 17 00:00:00 2001 From: David Steele Date: Sun, 28 Feb 2021 17:27:48 -0500 Subject: [PATCH] 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. --- src/build/configure.ac | 2 +- src/configure | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/build/configure.ac b/src/build/configure.ac index 4b246da4f..6e5dd3de9 100644 --- a/src/build/configure.ac +++ b/src/build/configure.ac @@ -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]) diff --git a/src/configure b/src/configure index ae01d8171..681b40c79 100755 --- a/src/configure +++ b/src/configure @@ -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