diff --git a/src/tests/color-management-profile-conflict-test.c b/src/tests/color-management-profile-conflict-test.c index d07ccc216..610158c6b 100644 --- a/src/tests/color-management-profile-conflict-test.c +++ b/src/tests/color-management-profile-conflict-test.c @@ -64,6 +64,7 @@ add_colord_system_profile (const char *cd_profile_id, GDBusProxy *proxy; g_autoptr (GError) error = NULL; GVariantBuilder params_builder; + g_autoptr (GVariant) ret = NULL; proxy = get_colord_mock_proxy (); @@ -71,11 +72,12 @@ add_colord_system_profile (const char *cd_profile_id, g_variant_builder_add (¶ms_builder, "s", cd_profile_id); g_variant_builder_add (¶ms_builder, "s", file_path); - if (!g_dbus_proxy_call_sync (proxy, - "AddSystemProfile", - g_variant_builder_end (¶ms_builder), - G_DBUS_CALL_FLAGS_NO_AUTO_START, -1, NULL, - &error)) + ret = g_dbus_proxy_call_sync (proxy, + "AddSystemProfile", + g_variant_builder_end (¶ms_builder), + G_DBUS_CALL_FLAGS_NO_AUTO_START, -1, NULL, + &error); + if (ret == NULL) g_error ("Failed to add system profile: %s", error->message); } diff --git a/src/tests/meta-context-test.c b/src/tests/meta-context-test.c index 97dd44566..89a4d00f7 100644 --- a/src/tests/meta-context-test.c +++ b/src/tests/meta-context-test.c @@ -390,10 +390,11 @@ meta_context_test_init (MetaContextTest *context_test) return; } - if (!g_dbus_proxy_call_sync (proxy, - "Reset", - NULL, - G_DBUS_CALL_FLAGS_NO_AUTO_START, -1, NULL, - &error)) + ret = g_dbus_proxy_call_sync (proxy, + "Reset", + NULL, + G_DBUS_CALL_FLAGS_NO_AUTO_START, -1, NULL, + &error); + if (ret == NULL) g_warning ("Failed to clear mocked color devices: %s", error->message); }