build: Drop pointless -Wformat-security warning flag

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 <withnall@endlessm.com>

https://gitlab.gnome.org/GNOME/glib/issues/656
This commit is contained in:
Philip Withnall 2018-09-03 19:36:29 +01:00
parent 0232cf64c6
commit 9e9db46a49
2 changed files with 1 additions and 2 deletions

View File

@ -3408,7 +3408,7 @@ AS_IF([test "x$enable_compile_warnings" != xno], [
-Wno-bad-function-cast \ -Wno-bad-function-cast \
-Werror=declaration-after-statement \ -Werror=declaration-after-statement \
-Werror=missing-prototypes -Werror=implicit-function-declaration \ -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]) -Werror=format=2 -Werror=missing-include-dirs])
]) ])
AC_SUBST(GLIB_WARN_CFLAGS) AC_SUBST(GLIB_WARN_CFLAGS)

View File

@ -352,7 +352,6 @@ if cc.get_id() == 'gcc' or cc.get_id() == 'clang'
'-Wno-bad-function-cast', '-Wno-bad-function-cast',
'-Werror=declaration-after-statement', '-Werror=declaration-after-statement',
'-Werror=format=2', '-Werror=format=2',
'-Werror=format-security',
'-Werror=implicit-function-declaration', '-Werror=implicit-function-declaration',
'-Werror=init-self', '-Werror=init-self',
'-Werror=missing-include-dirs', '-Werror=missing-include-dirs',