[gnome-control-center] background: Fix compile warning about object type



commit 930aff4cc7d5a163a6513df7e7a3803780172dea
Author: Robert Ancell <robert ancell canonical com>
Date:   Fri Jun 1 14:29:28 2018 +1200

    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,
     ^~~~~~~~~~~~~~~~~~

 panels/background/cc-background-xml.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/panels/background/cc-background-xml.c b/panels/background/cc-background-xml.c
index 4bcef3046..4cb774e44 100644
--- a/panels/background/cc-background-xml.c
+++ b/panels/background/cc-background-xml.c
@@ -307,7 +307,7 @@ cc_background_xml_load_xml_internal (CcBackgroundXml *xml,
                            g_strdup (id),
                            g_object_ref (item));
       if (in_thread)
-        emit_added_in_idle (xml, g_object_ref (item));
+        emit_added_in_idle (xml, g_object_ref (G_OBJECT (item)));
       else
         g_signal_emit (G_OBJECT (xml), signals[ADDED], 0, item);
       retval = TRUE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]