gobject: fix typecasts via g_object_ref

Now that g_object_ref() propagates the parameter type to the
return value, we need to cast to ensure the result is warning
free.

https://bugzilla.gnome.org/show_bug.cgi?id=790697
This commit is contained in:
Christian Hergert
2017-11-22 00:00:39 -08:00
committed by Philip Withnall
parent c26aab36db
commit f44472e715
8 changed files with 8 additions and 8 deletions

View File

@@ -46,7 +46,7 @@ my_singleton_constructor (GType type,
GObjectConstructParam *construct_properties)
{
if (the_one_and_only)
return g_object_ref (the_one_and_only);
return g_object_ref (G_OBJECT (the_one_and_only));
else
return G_OBJECT_CLASS (my_singleton_parent_class)->constructor (type, n_construct_properties, construct_properties);
}