[glib: 12/15] Fixing missing initializer warnings in glib/tests/option-context.c




commit 8045b77c323370b15e7c6e9812daff2e85b4182b
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date:   Sun Nov 8 22:28:37 2020 +0100

    Fixing missing initializer warnings in glib/tests/option-context.c
    
    glib/tests/option-context.c: In function ‘callback_test_optional_5’:
    glib/tests/option-context.c:945:5: error: missing initializer for field ‘arg_description’ of 
‘GOptionEntry’ {aka ‘struct _GOptionEntry’}
      945 |     { { "dummy", 'd', 0, G_OPTION_ARG_NONE, &dummy, NULL },
          |     ^
    In file included from glib/glib.h:64,
                     from glib/tests/option-context.c:23:
    glib/goption.h:268:16: note: ‘arg_description’ declared here
      268 |   const gchar *arg_description;
          |                ^~~~~~~~~~~~~~~
    glib/tests/option-context.c: In function ‘callback_test_optional_6’:
    glib/tests/option-context.c:983:5: error: missing initializer for field ‘arg_description’ of 
‘GOptionEntry’ {aka ‘struct _GOptionEntry’}
      983 |     { { "dummy", 'd', 0, G_OPTION_ARG_NONE, &dummy, NULL },
          |     ^
    In file included from glib/glib.h:64,
                     from glib/tests/option-context.c:23:
    glib/goption.h:268:16: note: ‘arg_description’ declared here
      268 |   const gchar *arg_description;
          |                ^~~~~~~~~~~~~~~
    glib/tests/option-context.c: In function ‘callback_test_optional_7’:
    glib/tests/option-context.c:1021:5: error: missing initializer for field ‘arg_description’ of 
‘GOptionEntry’ {aka ‘struct _GOptionEntry’}
     1021 |     { { "dummy", 'd', 0, G_OPTION_ARG_NONE, &dummy, NULL },
          |     ^
    In file included from glib/glib.h:64,
                     from glib/tests/option-context.c:23:
    glib/goption.h:268:16: note: ‘arg_description’ declared here
      268 |   const gchar *arg_description;
          |                ^~~~~~~~~~~~~~~
    glib/tests/option-context.c: In function ‘callback_test_optional_8’:
    glib/tests/option-context.c:1059:5: error: missing initializer for field ‘arg_description’ of 
‘GOptionEntry’ {aka ‘struct _GOptionEntry’}
     1059 |     { { "dummy", 'd', 0, G_OPTION_ARG_NONE, &dummy, NULL },
          |     ^
    In file included from glib/glib.h:64,
                     from glib/tests/option-context.c:23:
    glib/goption.h:268:16: note: ‘arg_description’ declared here
      268 |   const gchar *arg_description;
          |                ^~~~~~~~~~~~~~~

 glib/tests/option-context.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/glib/tests/option-context.c b/glib/tests/option-context.c
index 68e990db0..ec66e6f94 100644
--- a/glib/tests/option-context.c
+++ b/glib/tests/option-context.c
@@ -943,7 +943,7 @@ callback_test_optional_5 (void)
   gchar **argv_copy;
   int argc;
   GOptionEntry entries [] =
-    { { "dummy", 'd', 0, G_OPTION_ARG_NONE, &dummy, NULL },
+    { { "dummy", 'd', 0, G_OPTION_ARG_NONE, &dummy, NULL, NULL },
       { "test", 't', G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_CALLBACK, 
        callback_parse_optional, NULL, NULL },
       { NULL } };
@@ -981,7 +981,7 @@ callback_test_optional_6 (void)
   gchar **argv_copy;
   int argc;
   GOptionEntry entries [] =
-    { { "dummy", 'd', 0, G_OPTION_ARG_NONE, &dummy, NULL },
+    { { "dummy", 'd', 0, G_OPTION_ARG_NONE, &dummy, NULL, NULL },
       { "test", 't', G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_CALLBACK, 
        callback_parse_optional, NULL, NULL },
       { NULL } };
@@ -1019,7 +1019,7 @@ callback_test_optional_7 (void)
   gchar **argv_copy;
   int argc;
   GOptionEntry entries [] =
-    { { "dummy", 'd', 0, G_OPTION_ARG_NONE, &dummy, NULL },
+    { { "dummy", 'd', 0, G_OPTION_ARG_NONE, &dummy, NULL, NULL },
       { "test", 't', G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_CALLBACK, 
        callback_parse_optional, NULL, NULL },
       { NULL } };
@@ -1057,7 +1057,7 @@ callback_test_optional_8 (void)
   gchar **argv_copy;
   int argc;
   GOptionEntry entries [] =
-    { { "dummy", 'd', 0, G_OPTION_ARG_NONE, &dummy, NULL },
+    { { "dummy", 'd', 0, G_OPTION_ARG_NONE, &dummy, NULL, NULL },
       { "test", 't', G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_CALLBACK, 
        callback_parse_optional, NULL, NULL },
       { NULL } };


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