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
commit928d68d04af20808f801f05f92ad83179d7b826e (patch)
treed36b86784a8a174109d31d9217c45dee7c2641ae /m4
parentfcad4fba166829e071bfc6d8ceaafd47bab3a536 (diff)
downloadNetworkManager-928d68d04af20808f801f05f92ad83179d7b826e.tar.gz
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 5275281d71..23929af8db 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)