[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,
^~~~~~~~~~~~~~~~~~
Commit b9e3603ba4 added an unref to fix a
memory leak, but it went to a wrong place -- in XML loader, all items
are stored in a hash table that takes ownership of them, and destroyed
when the hash table goes away.
This commit fixes the reference counting in the XML loader and adds
explicit g_object_ref / g_strdup when inserting values to the hash table
to make the memory management more obvious.
The following commit fixes the real leak.
https://bugzilla.gnome.org/show_bug.cgi?id=709453
Make sure item_added_id is set to zero only when the idle source id is
actually removed. This ensures that the source is removed during finalize
if it still exists when the object is destroyed.
The file is in $incdir/gsettings-desktop-schemas/gdesktop-enums.h,
and pkg-config returns -I$incdir/gsettings-desktop-schemas, so the
right way is to #include <gdesktop-enums.h> which is what other modules
do.
https://bugzilla.gnome.org/show_bug.cgi?id=642369
If an xml file references a wallpaper that doesn't exist
(as seen by installing the desktop-backgrounds-basic package
on Fedora), then just don't add it to the list of wallpapers.
Reported by Matthias Clasen