From cd5792a2b3cfa208963a9aaa9181ff95e8d61c8d Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 8 Jan 2021 12:36:23 +0100 Subject: [PATCH] Revert "build: set CFLAGS "-Wno-error=maybe-uninitialized" with LTO build" This was not intended to be pushed to master. Sorry. This reverts commit 1d63271a8d3d29f97d4c5d11eff1c5edc4e79874. --- m4/compiler_options.m4 | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/m4/compiler_options.m4 b/m4/compiler_options.m4 index 88b91a1472..d390a90cf0 100644 --- a/m4/compiler_options.m4 +++ b/m4/compiler_options.m4 @@ -62,12 +62,8 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then if test "x$enable_lto" = xyes; then dnl With LTO and optimizations enabled, gcc 10.2.1-1.fc32 is really - dnl adamant to warn about correct uses of strncpy. Disable "-Wstringop-overflow". - dnl - dnl Also, due to aggressive inlining, we get maybe-uninitialized false positives - dnl that are really hard to suppress. That is unfortunate, because generally - dnl these warnings are useful. Can't help it. Make them non-fatal. - _CFLAGS_MORE_WARNINGS_DISABLE_LTO="-Wno-stringop-overflow -Wno-error=maybe-uninitialized" + dnl adamant to warn about correct uses of strncpy. Disable that warning. + _CFLAGS_MORE_WARNINGS_DISABLE_LTO="-Wno-stringop-overflow" else _CFLAGS_MORE_WARNINGS_DISABLE_LTO= fi @@ -106,7 +102,7 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then -Wno-unused-parameter \ ; do dnl GCC 4.4 does not warn when checking for -Wno-* flags (https://gcc.gnu.org/wiki/FAQ#wnowarning) - _NM_COMPILER_FLAG([-Wall $(printf '%s' "$option" | sed -e 's/^-W\(no-\|no-error=\)/-W/')], [], + _NM_COMPILER_FLAG([-Wall $(printf '%s' "$option" | sed 's/^-Wno-/-W/')], [], [CFLAGS_MORE_WARNINGS="$CFLAGS_MORE_WARNINGS $option"], []) done unset option