From: Julian Seward Date: Sat, 26 Jan 2019 17:19:50 +0000 (+0100) Subject: Enable warning flag -Wenum-conversion if the compiler supports it. X-Git-Tag: VALGRIND_3_15_0~89 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e94579a5afa459641856d104008a1f5dc387fdd;p=thirdparty%2Fvalgrind.git Enable warning flag -Wenum-conversion if the compiler supports it. This picks up some enum type confusion, and so looks useful. Unfortunately only Clang seems to have it; gcc doesn't. --- diff --git a/Makefile.all.am b/Makefile.all.am index 4a29695cce..8ea95a6118 100644 --- a/Makefile.all.am +++ b/Makefile.all.am @@ -114,6 +114,7 @@ AM_CFLAGS_BASE = \ @FLAG_W_IGNORED_QUALIFIERS@ \ @FLAG_W_MISSING_PARAMETER_TYPE@ \ @FLAG_W_LOGICAL_OP@ \ + @FLAG_W_ENUM_CONVERSION@ \ @FLAG_W_OLD_STYLE_DECLARATION@ \ @FLAG_FNO_STACK_PROTECTOR@ \ @FLAG_FSANITIZE@ \ diff --git a/configure.ac b/configure.ac index 289514ff15..35c6f744b5 100644 --- a/configure.ac +++ b/configure.ac @@ -2112,6 +2112,7 @@ AC_GCC_WARNING_SUBST([old-style-declaration], [FLAG_W_OLD_STYLE_DECLARATION]) AC_GCC_WARNING_SUBST([ignored-qualifiers], [FLAG_W_IGNORED_QUALIFIERS]) AC_GCC_WARNING_SUBST([missing-parameter-type], [FLAG_W_MISSING_PARAMETER_TYPE]) AC_GCC_WARNING_SUBST([logical-op], [FLAG_W_LOGICAL_OP]) +AC_GCC_WARNING_SUBST([enum-conversion], [FLAG_W_ENUM_CONVERSION]) # Does this compiler support -Wformat-security ? # Special handling is needed, because certain GCC versions require -Wformat