Fix multiple missing initializer warnings in gio/tests/actions.c

gio/tests/actions.c: In function ‘test_entries’:
gio/tests/actions.c:375:5: error: missing initializer for field ‘parameter_type’ of ‘GActionEntry’ {aka ‘const struct _GActionEntry’}
  375 |     { "foo",    activate_foo                                     },
      |     ^
In file included from gio/gio.h:31,
                 from gio/tests/actions.c:1:
gio/gactionmap.h:63:16: note: ‘parameter_type’ declared here
   63 |   const gchar *parameter_type;
      |                ^~~~~~~~~~~~~~
...
This commit is contained in:
Emmanuel Fleury 2020-11-19 00:55:19 +01:00
parent 0710429598
commit c3d558df77

View File

@ -372,10 +372,10 @@ static void
test_entries (void)
{
const GActionEntry entries[] = {
{ "foo", activate_foo },
{ "bar", activate_bar, "s" },
{ "toggle", NULL, NULL, "false" },
{ "volume", NULL, NULL, "0", change_volume_state }
{ "foo", activate_foo, NULL, NULL, NULL, { 0 } },
{ "bar", activate_bar, "s", NULL, NULL, { 0 } },
{ "toggle", NULL, NULL, "false", NULL, { 0 } },
{ "volume", NULL, NULL, "0", change_volume_state, { 0 } },
};
GSimpleActionGroup *actions;
GVariant *state;
@ -399,10 +399,10 @@ test_entries (void)
if (g_test_undefined ())
{
const GActionEntry bad_type = {
"bad-type", NULL, "ss"
"bad-type", NULL, "ss", NULL, NULL, { 0 }
};
const GActionEntry bad_state = {
"bad-state", NULL, NULL, "flse"
"bad-state", NULL, NULL, "flse", NULL, { 0 }
};
g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL,
@ -638,13 +638,13 @@ stop_loop (gpointer data)
}
static GActionEntry exported_entries[] = {
{ "undo", activate_action, NULL, NULL, NULL },
{ "redo", activate_action, NULL, NULL, NULL },
{ "cut", activate_action, NULL, NULL, NULL },
{ "copy", activate_action, NULL, NULL, NULL },
{ "paste", activate_action, NULL, NULL, NULL },
{ "bold", activate_toggle, NULL, "true", NULL },
{ "lang", activate_radio, "s", "'latin'", NULL },
{ "undo", activate_action, NULL, NULL, NULL, { 0 } },
{ "redo", activate_action, NULL, NULL, NULL, { 0 } },
{ "cut", activate_action, NULL, NULL, NULL, { 0 } },
{ "copy", activate_action, NULL, NULL, NULL, { 0 } },
{ "paste", activate_action, NULL, NULL, NULL, { 0 } },
{ "bold", activate_toggle, NULL, "true", NULL, { 0 } },
{ "lang", activate_radio, "s", "'latin'", NULL, { 0 } },
};
static void
@ -920,8 +920,8 @@ test_dbus_threaded (void)
GSimpleActionGroup *group[10];
GThread *export[10];
static GActionEntry entries[] = {
{ "a", activate_action, NULL, NULL, NULL },
{ "b", activate_action, NULL, NULL, NULL },
{ "a", activate_action, NULL, NULL, NULL, { 0 } },
{ "b", activate_action, NULL, NULL, NULL, { 0 } },
};
gint i;