diff options
author | Thomas Haller <thaller@redhat.com> | 2017-11-20 21:36:17 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-11-20 21:36:25 +0100 |
commit | 063a221710b82cc7cce4a9cbb90dfa8512b673ff (patch) | |
tree | 0b850f87c33d0ec37d862e63c6aa10c52038f112 | |
parent | 00c808c41084b23dcfcab839c6c1ea7d3d6c3796 (diff) | |
download | network-manager-applet-063a221710b82cc7cce4a9cbb90dfa8512b673ff.tar.gz |
m4: re-import m4/compiler_options.m4 to disable -Wmissing-braces
-rw-r--r-- | 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 5275281d..ccb51f5e 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) |