Skip to content
  • Robert Ancell's avatar
    background: Fix compile warning about object type · 930aff4c
    Robert Ancell authored
    [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,
     ^~~~~~~~~~~~~~~~~~
    930aff4c