[network-manager-applet/th/vpn-secrets-bgo790655: 1/9] m4: re-import m4/compiler_options.m4 to disable -Wmissing-braces



commit 063a221710b82cc7cce4a9cbb90dfa8512b673ff
Author: Thomas Haller <thaller redhat com>
Date:   Mon Nov 20 21:36:17 2017 +0100

    m4: re-import m4/compiler_options.m4 to disable -Wmissing-braces

 m4/compiler_options.m4 |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/m4/compiler_options.m4 b/m4/compiler_options.m4
index 5275281..ccb51f5 100644
--- a/m4/compiler_options.m4
+++ b/m4/compiler_options.m4
@@ -70,11 +70,13 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
                      -Wimplicit-fallthrough \
                      -Wimplicit-function-declaration \
                      -Winit-self \
+                     -Wlogical-op \
                      -Wmissing-declarations \
                      -Wmissing-include-dirs \
                      -Wmissing-prototypes \
                      -Wpointer-arith \
                      -Wshadow \
+                     -Wshift-negative-value \
                      -Wstrict-prototypes \
                      -Wundef \
                      -Wno-duplicate-decl-specifier \
@@ -119,6 +121,12 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
                [int f () { int i = yolo; yolo; return i; }]
        )
 
+       dnl clang 3.9 would like to see "{ { 0 } }" here, but that does not
+       dnl look too wise.
+       NM_COMPILER_WARNING([missing-braces],
+               [union { int a[1]; int b[2]; } c = { 0 }]
+       )
+
        CFLAGS="$CFLAGS_MORE_WARNINGS $CFLAGS"
 else
        AC_MSG_RESULT(no)


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