mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-15 04:24:32 +00:00
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 43012156a3
)
This commit is contained in:
parent
fcad4fba16
commit
928d68d04a
|
@ -119,6 +119,12 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
|
||||||
[int f () { int i = yolo; yolo; return i; }]
|
[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"
|
CFLAGS="$CFLAGS_MORE_WARNINGS $CFLAGS"
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
|
|
Loading…
Reference in a new issue