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.
This commit is contained in:
Lubomir Rintel 2017-04-15 12:23:42 +02:00
parent c76ee5883d
commit 43012156a3

View file

@ -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)