background: Fix compile warning about object type

[8/15] Compiling C object 'panels/background/panels@background@@background-chooser@sta/cc-background-xml.c.o'.
In file included from /usr/include/glib-2.0/gobject/gbinding.h:29:0,
                 from /usr/include/glib-2.0/glib-object.h:23,
                 from /usr/include/glib-2.0/gio/gioenums.h:28,
                 from /usr/include/glib-2.0/gio/giotypes.h:28,
                 from /usr/include/glib-2.0/gio/gio.h:26,
                 from ../panels/background/cc-background-xml.c:22:
../panels/background/cc-background-xml.c: In function ‘cc_background_xml_load_xml_internal’:
/usr/include/glib-2.0/gobject/gobject.h:512:32: warning: passing argument 2 of ‘emit_added_in_idle’ from incompatible pointer type [-Wincompatible-pointer-types]
 #define g_object_ref(Obj)      ((__typeof__(Obj)) (g_object_ref) (Obj))
                                ^
../panels/background/cc-background-xml.c:310:34: note: in expansion of macro ‘g_object_ref’
         emit_added_in_idle (xml, g_object_ref (item));
                                  ^~~~~~~~~~~~
../panels/background/cc-background-xml.c:138:1: note: expected ‘GObject * {aka struct _GObject *}’ but argument is of type ‘CcBackgroundItem * {aka struct _CcBackgroundItem *}’
 emit_added_in_idle (CcBackgroundXml *xml,
 ^~~~~~~~~~~~~~~~~~
This commit is contained in:
Robert Ancell 2018-06-01 14:29:28 +12:00
parent 0bd90ca34b
commit 930aff4cc7

View file

@ -307,7 +307,7 @@ cc_background_xml_load_xml_internal (CcBackgroundXml *xml,
g_strdup (id), g_strdup (id),
g_object_ref (item)); g_object_ref (item));
if (in_thread) if (in_thread)
emit_added_in_idle (xml, g_object_ref (item)); emit_added_in_idle (xml, g_object_ref (G_OBJECT (item)));
else else
g_signal_emit (G_OBJECT (xml), signals[ADDED], 0, item); g_signal_emit (G_OBJECT (xml), signals[ADDED], 0, item);
retval = TRUE; retval = TRUE;