From c3d558df77806e38e69597dca8475060c23f0cc3 Mon Sep 17 00:00:00 2001 From: Emmanuel Fleury Date: Thu, 19 Nov 2020 00:55:19 +0100 Subject: [PATCH] Fix multiple missing initializer warnings in gio/tests/actions.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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; | ^~~~~~~~~~~~~~ ... --- gio/tests/actions.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/gio/tests/actions.c b/gio/tests/actions.c index c183c7aa1..27dee7fd8 100644 --- a/gio/tests/actions.c +++ b/gio/tests/actions.c @@ -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;