diff --git a/gio/tests/gdbus-connection.c b/gio/tests/gdbus-connection.c index 51dd27f7e..0410a880a 100644 --- a/gio/tests/gdbus-connection.c +++ b/gio/tests/gdbus-connection.c @@ -86,7 +86,8 @@ static const GDBusInterfaceVTable boo_vtable = { NULL, /* _method_call */ NULL, /* _get_property */ - NULL /* _set_property */ + NULL, /* _set_property */ + { 0 } }; /* Runs in a worker thread. */ diff --git a/gio/tests/gdbus-export.c b/gio/tests/gdbus-export.c index 61d47e90a..aec21d7d0 100644 --- a/gio/tests/gdbus-export.c +++ b/gio/tests/gdbus-export.c @@ -127,6 +127,8 @@ static const GDBusInterfaceInfo foo2_interface_info = "org.example.Foo2", (GDBusMethodInfo **) &foo_method_info_pointers, (GDBusSignalInfo **) &foo_signal_info_pointers, + NULL, + NULL }; static void @@ -198,7 +200,8 @@ static const GDBusInterfaceVTable foo_vtable = { foo_method_call, foo_get_property, - foo_set_property + foo_set_property, + { 0 }, }; /* -------------------- */ @@ -311,7 +314,8 @@ static const GDBusInterfaceVTable dyna_interface_vtable = { dyna_cyber, NULL, - NULL + NULL, + { 0 } }; /* ---------------------------------------------------------------------------------------------------- */ @@ -693,7 +697,8 @@ static const GDBusSubtreeVTable subtree_vtable = { subtree_enumerate, subtree_introspect, - subtree_dispatch + subtree_dispatch, + { 0 } }; /* -------------------- */ @@ -747,7 +752,8 @@ static const GDBusSubtreeVTable dynamic_subtree_vtable = { dynamic_subtree_enumerate, dynamic_subtree_introspect, - dynamic_subtree_dispatch + dynamic_subtree_dispatch, + { 0 } }; /* -------------------- */ @@ -1729,7 +1735,7 @@ test_async_properties (void) GError *error = NULL; guint registration_id, registration_id2; static const GDBusInterfaceVTable vtable = { - test_async_method_call, NULL, NULL + test_async_method_call, NULL, NULL, { 0 } }; c = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error); diff --git a/gio/tests/gdbus-test-codegen.c b/gio/tests/gdbus-test-codegen.c index 36be37b72..0681e7ec8 100644 --- a/gio/tests/gdbus-test-codegen.c +++ b/gio/tests/gdbus-test-codegen.c @@ -1920,7 +1920,7 @@ check_object_manager (void) GError *error; GMainLoop *loop; OMData *om_data = NULL; - guint om_signal_id = -1; + guint om_signal_id = 0; GDBusObjectManager *pm = NULL; GList *object_proxies; GList *proxies; @@ -2356,7 +2356,7 @@ check_object_manager (void) if (loop != NULL) g_main_loop_unref (loop); - if (om_signal_id != -1) + if (om_signal_id != 0) g_dbus_connection_signal_unsubscribe (c, om_signal_id); g_clear_object (&o3); g_clear_object (&o2); diff --git a/gio/tests/socket.c b/gio/tests/socket.c index ee098c55f..3a567ec9d 100644 --- a/gio/tests/socket.c +++ b/gio/tests/socket.c @@ -1694,7 +1694,8 @@ test_get_available (gconstpointer user_data) for (tries = 0; tries < 100; tries++) { - if (g_socket_get_available_bytes (server) > sizeof (data)) + gssize res = g_socket_get_available_bytes (server); + if ((res == -1) || ((gsize) res > sizeof (data))) break; g_usleep (100000); } diff --git a/gio/tests/testfilemonitor.c b/gio/tests/testfilemonitor.c index 44c70805b..3a94a0353 100644 --- a/gio/tests/testfilemonitor.c +++ b/gio/tests/testfilemonitor.c @@ -120,7 +120,8 @@ check_expected_events (RecordedEvent *expected, GList *recorded, Environment env) { - gint i, li; + gsize i; + gint li; GList *l; for (i = 0, li = 0, l = recorded; i < n_expected && l != NULL;) @@ -219,7 +220,7 @@ check_expected_events (RecordedEvent *expected, e2->event_type == G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT) { g_test_message ("Event CHANGES_DONE_HINT ignored at " - "expected index %d, recorded index %d", i, li); + "expected index %" G_GSIZE_FORMAT ", recorded index %d", i, li); li++, l = l->next; continue; } @@ -227,7 +228,7 @@ check_expected_events (RecordedEvent *expected, * the event doesn't match, it means the expected event has lost. */ else if (env & e1->optional) { - g_test_message ("Event %d at expected index %d skipped because " + g_test_message ("Event %d at expected index %" G_GSIZE_FORMAT " skipped because " "it is marked as optional", e1->event_type, i); i++; continue; diff --git a/glib/gstring.c b/glib/gstring.c index 030d75316..caf338b3a 100644 --- a/glib/gstring.c +++ b/glib/gstring.c @@ -978,7 +978,7 @@ g_string_replace (GString *string, { gsize f_len, r_len, pos; gchar *cur, *next; - gint n = 0; + guint n = 0; g_return_val_if_fail (string != NULL, 0); g_return_val_if_fail (find != NULL, 0);