summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorDaniel Boles <dboles.src@gmail.com>2018-06-29 18:38:15 +0100
committerDaniel Boles <dboles.src@gmail.com>2018-06-29 18:46:09 +0100
commit62573f299c585b89ff4079758753a1458a623692 (patch)
tree8b8f4ce77a8d199815614a68a96cadfb1cc484e9 /testsuite
parentc0bf48c8ab82a445983bb68479160537700f85dc (diff)
downloadgtk+-62573f299c585b89ff4079758753a1458a623692.tar.gz
defaultvalue: Stop warnings via new g_object_ref()
Now that it can propagate the type, we must explicitly cast to GObject* to assign it, otherwise gcc shouts.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/gtk/defaultvalue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/testsuite/gtk/defaultvalue.c b/testsuite/gtk/defaultvalue.c
index 0cc445f0cc..05f176f950 100644
--- a/testsuite/gtk/defaultvalue.c
+++ b/testsuite/gtk/defaultvalue.c
@@ -104,7 +104,7 @@ test_type (gconstpointer data)
klass = g_type_class_ref (type);
if (g_type_is_a (type, GTK_TYPE_SETTINGS))
- instance = g_object_ref (gtk_settings_get_default ());
+ instance = G_OBJECT (g_object_ref (gtk_settings_get_default ()));
else if (g_type_is_a (type, GDK_TYPE_WINDOW))
{
GdkWindowAttr attributes;
@@ -113,7 +113,7 @@ test_type (gconstpointer data)
attributes.event_mask = 0;
attributes.width = 100;
attributes.height = 100;
- instance = g_object_ref (gdk_window_new (NULL, &attributes, 0));
+ instance = G_OBJECT (g_object_ref (gdk_window_new (NULL, &attributes, 0)));
}
else if (g_str_equal (g_type_name (type), "GdkX11Cursor"))
instance = g_object_new (type, "display", display, NULL);