diff options
author | Thomas Haller <thaller@redhat.com> | 2019-02-08 11:00:19 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-02-08 20:14:50 +0100 |
commit | a44d276f556a0bb4de46216a3a80aaa9dcfb1806 (patch) | |
tree | a5546aff08507d535ed2c2b91a0d2782f63e671b | |
parent | ce8b053674c48dbdb78360c98a40cf88a8d9764a (diff) | |
download | NetworkManager-a44d276f556a0bb4de46216a3a80aaa9dcfb1806.tar.gz |
libnm: avoid "-Wmissing-braces" warning for test-link.c
../src/platform/tests/test-link.c: In function ‘_test_wireguard_change’:
../src/platform/tests/test-link.c:861:16: warning: missing braces around initializer [-Wmissing-braces]
endpoint = (NMSockAddrUnion) {
^
../src/platform/tests/test-link.c:864:21:
.sin_addr = nmtst_inet4_from_string (nm_sprintf_buf (s_addr, "192.168.7.%d", i)),
{ }
../src/platform/tests/test-link.c:861:16: warning: missing braces around initializer [-Wmissing-braces]
endpoint = (NMSockAddrUnion) {
^
../src/platform/tests/test-link.c:864:21:
.sin_addr = nmtst_inet4_from_string (nm_sprintf_buf (s_addr, "192.168.7.%d", i)),
{
-rw-r--r-- | src/platform/tests/test-link.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/platform/tests/test-link.c b/src/platform/tests/test-link.c index 21f1a80dbb..549b9276ff 100644 --- a/src/platform/tests/test-link.c +++ b/src/platform/tests/test-link.c @@ -860,9 +860,9 @@ _test_wireguard_change (NMPlatform *platform, if ((i % 2) == 1) { endpoint = (NMSockAddrUnion) { .in = { - .sin_family = AF_INET, - .sin_addr = nmtst_inet4_from_string (nm_sprintf_buf (s_addr, "192.168.7.%d", i)), - .sin_port = htons (14000 + i), + .sin_family = AF_INET, + .sin_addr.s_addr = nmtst_inet4_from_string (nm_sprintf_buf (s_addr, "192.168.7.%d", i)), + .sin_port = htons (14000 + i), }, }; } else { |