[glib: 1/2] build: Drop pointless -Wformat-security warning flag



commit 9e9db46a49166891fd81c8d4d1e88f2bf0fbfebf
Author: Philip Withnall <withnall endlessm com>
Date:   Mon Sep 3 19:36:29 2018 +0100

    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

 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',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]