[glib: 2/7] Fix missing initializer warnings in gio/tests/socket.c




commit 652a7b7db106e3ca211e4dff4956e64cc421a894
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date:   Thu Apr 29 08:30:44 2021 +0200

    Fix missing initializer warnings in gio/tests/socket.c
    
    gio/tests/socket.c:505:36: warning: missing field 'size' initializer
        GOutputVector v[7] = { { NULL, }, };
                                       ^
    gio/tests/socket.c:630:37: warning: missing field 'vectors' initializer
        GOutputMessage m[3] = { { NULL, }, };
                                        ^
    gio/tests/socket.c:631:37: warning: missing field 'vectors' initializer
        GInputMessage im[3] = { { NULL, }, };
                                        ^
    gio/tests/socket.c:632:36: warning: missing field 'size' initializer
        GOutputVector v[7] = { { NULL, }, };
                                       ^
    gio/tests/socket.c:633:36: warning: missing field 'size' initializer
        GInputVector iv[7] = { { NULL, }, };
                                       ^
    gio/tests/socket.c:871:32: warning: missing field 'vectors' initializer
        GInputMessage im = { NULL, };
                                   ^
    gio/tests/socket.c:872:31: warning: missing field 'size' initializer
        GInputVector iv = { NULL, };
                                  ^

 gio/tests/socket.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/gio/tests/socket.c b/gio/tests/socket.c
index dd984e2e0..fa96a4087 100644
--- a/gio/tests/socket.c
+++ b/gio/tests/socket.c
@@ -502,7 +502,7 @@ test_ip_sync (GSocketFamily family)
   g_assert_cmpstr (testbuf, ==, buf);
 
   {
-    GOutputVector v[7] = { { NULL, }, };
+    GOutputVector v[7] = { { NULL, 0 }, };
 
     v[0].buffer = testbuf2 + 0;
     v[0].size = 3;
@@ -627,10 +627,10 @@ test_ip_sync_dgram (GSocketFamily family)
   g_assert_cmpstr (testbuf, ==, buf);
 
   {
-    GOutputMessage m[3] = { { NULL, }, };
-    GInputMessage im[3] = { { NULL, }, };
-    GOutputVector v[7] = { { NULL, }, };
-    GInputVector iv[7] = { { NULL, }, };
+    GOutputMessage m[3] = { { NULL, NULL, 0, 0, NULL, 0 }, };
+    GInputMessage im[3] = { { NULL, NULL, 0, 0, 0, NULL, 0 }, };
+    GOutputVector v[7] = { { NULL, 0 }, };
+    GInputVector iv[7] = { { NULL, 0 }, };
 
     v[0].buffer = testbuf2 + 0;
     v[0].size = 3;
@@ -868,8 +868,8 @@ test_ip_sync_dgram_timeouts (GSocketFamily family)
   /* Check for timeouts when no server is running. */
   {
     gint64 start_time;
-    GInputMessage im = { NULL, };
-    GInputVector iv = { NULL, };
+    GInputMessage im = { NULL, NULL, 0, 0, 0, NULL, 0 };
+    GInputVector iv = { NULL, 0 };
     guint8 buf[128];
 
     iv.buffer = buf;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]