diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -286,6 +286,7 @@ ## unknown options if any other warning is produced. Test the -Wfoo case, and ## set the -Wno-foo case if it works. AX_CHECK_COMPILE_FLAG([-Wunused-parameter],[CXXFLAGS="$CXXFLAGS -Wno-unused-parameter"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Wimplicit-fallthrough],[CXXFLAGS="$CXXFLAGS -Wno-implicit-fallthrough"],,[[$CXXFLAG_WERROR]]) fi # Check for optional instruction set support. Enabling these does _not_ imply that all code will diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -89,6 +89,7 @@ -Wformat -Wvla -Wformat-security + -Wimplicit-fallthrough -Wcast-align -Wunused-parameter -Wmissing-braces @@ -102,6 +103,7 @@ add_cxx_compiler_flag(-Wsuggest-override) else() add_compiler_flag(-Wno-unused-parameter) + add_compiler_flag(-Wno-implicit-fallthrough) endif() # Create a target for OpenSSL