Commit 928d68d0 authored by Lubomir Rintel's avatar Lubomir Rintel 🥕 Committed by Beniamino Galvani

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 43012156)
parent fcad4fba
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment