diff --git a/CMakeLists.txt b/CMakeLists.txt index 708f8a1b..53ec8c5f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -163,7 +163,7 @@ if (CMAKE_COMPILER_IS_GNUCC) option(EVENT__ENABLE_GCC_FUNCTION_SECTIONS "Enable gcc function sections" OFF) option(EVENT__ENABLE_GCC_WARNINGS "Make all GCC warnings into errors" OFF) - list(APPEND __FLAGS -Wall) + list(APPEND __FLAGS -Wall -Wswitch) if (EVENT__DISABLE_GCC_WARNINGS) list(APPEND __FLAGS -w) diff --git a/configure.ac b/configure.ac index 6a669fb7..52710b54 100644 --- a/configure.ac +++ b/configure.ac @@ -792,7 +792,7 @@ if test x$enable_gcc_warnings != xno && test "$GCC" = "yes"; then #error #endif])], have_clang=yes, have_clang=no) - CFLAGS="$CFLAGS -W -Wfloat-equal -Wundef -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wbad-function-cast -Wswitch-enum" + CFLAGS="$CFLAGS -W -Wfloat-equal -Wundef -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wbad-function-cast -Wswitch" if test x$enable_gcc_warnings = xyes; then CFLAGS="$CFLAGS -Werror" fi