From 9e9db46a49166891fd81c8d4d1e88f2bf0fbfebf Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Mon, 3 Sep 2018 19:36:29 +0100 Subject: [PATCH] build: Drop pointless -Wformat-security warning flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We already set -Wformat=2, which implies -Wformat-security, so there’s no need to test for and set -Wformat-security separately. The test for -Wformat-security never worked anyway, since gcc complains if it’s specified without also setting -Wformat to some value. The complaint causes configure.ac/meson.build to assume the option doesn’t work. Signed-off-by: Philip Withnall https://gitlab.gnome.org/GNOME/glib/issues/656 --- configure.ac | 2 +- meson.build | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 38564e790..f6b2ee6c4 100644 --- a/configure.ac +++ b/configure.ac @@ -3408,7 +3408,7 @@ AS_IF([test "x$enable_compile_warnings" != xno], [ -Wno-bad-function-cast \ -Werror=declaration-after-statement \ -Werror=missing-prototypes -Werror=implicit-function-declaration \ - -Werror=pointer-arith -Werror=init-self -Werror=format-security \ + -Werror=pointer-arith -Werror=init-self \ -Werror=format=2 -Werror=missing-include-dirs]) ]) AC_SUBST(GLIB_WARN_CFLAGS) diff --git a/meson.build b/meson.build index 0aadcd3db..2bf6cc636 100644 --- a/meson.build +++ b/meson.build @@ -352,7 +352,6 @@ if cc.get_id() == 'gcc' or cc.get_id() == 'clang' '-Wno-bad-function-cast', '-Werror=declaration-after-statement', '-Werror=format=2', - '-Werror=format-security', '-Werror=implicit-function-declaration', '-Werror=init-self', '-Werror=missing-include-dirs',