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;
      |                ^~~~~~~~~~~~~~~
This commit is contained in:
Emmanuel Fleury 2020-11-08 22:28:37 +01:00
parent 913d222c88
commit 8045b77c32

View File

@ -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 } };