summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2017-04-15 12:23:42 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2017-04-18 09:44:45 +0200
commit046a73d161fb872c3eac17f6630c42711c4e8f44 (patch)
treed36b86784a8a174109d31d9217c45dee7c2641ae /m4
parent30166048dc04a5115c9d241819251da8cc74e552 (diff)
m4: disable -Wmissing-braces for newer clang
src/NetworkManagerUtils.c:347:18: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] NMIPAddr a1 = { 0 }, a2 = { 0 }; ^ {} Should we initialize unions this way? I think it's all right -- the initializer works well and { { { 0 } } } is probably not what we'd like to see. (cherry picked from commit 43012156a31fb452ba774196baf106027c2c9067)
Diffstat (limited to 'm4')
-rw-r--r--m4/compiler_options.m46
1 files changed, 6 insertions, 0 deletions
diff --git a/m4/compiler_options.m4 b/m4/compiler_options.m4
index 5275281d7..23929af8d 100644
--- a/m4/compiler_options.m4
+++ b/m4/compiler_options.m4
@@ -119,6 +119,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)