GNOME Bugzilla – Bug 797310
Fails to compile
Last modified: 2018-10-22 07:56:12 UTC
This is with GLib 2.58.1 and gcc 8.2.0. I'm not sure what the actual problem here is. In file included from /usr/include/glib-2.0/glib/glist.h:32, from /usr/include/glib-2.0/glib/ghash.h:33, from /usr/include/glib-2.0/glib.h:50, from ges.h:24, from ges-base-xml-formatter.c:21: ges-base-xml-formatter.c: In function ‘_dispose’: ges-base-xml-formatter.c:352:7: error: function called through a non-compatible type [-Werror] (GDestroyNotify) g_hash_table_unref); /usr/include/glib-2.0/glib/gmem.h:121:8: note: in definition of macro ‘g_clear_pointer’ (destroy) (_ptr); \ ^~~~~~~ ges-base-xml-formatter.c:353:39: error: function called through a non-compatible type [-Werror] g_clear_pointer (&priv->containers, (GDestroyNotify) g_hash_table_unref); /usr/include/glib-2.0/glib/gmem.h:121:8: note: in definition of macro ‘g_clear_pointer’ (destroy) (_ptr); \ ^~~~~~~ ges-base-xml-formatter.c:354:44: error: function called through a non-compatible type [-Werror] g_clear_pointer (&priv->clipid_pendings, (GDestroyNotify) g_hash_table_unref); /usr/include/glib-2.0/glib/gmem.h:121:8: note: in definition of macro ‘g_clear_pointer’ (destroy) (_ptr); \ ^~~~~~~ ges-base-xml-formatter.c:355:35: error: function called through a non-compatible type [-Werror] g_clear_pointer (&priv->tracks, (GDestroyNotify) g_hash_table_unref); /usr/include/glib-2.0/glib/gmem.h:121:8: note: in definition of macro ‘g_clear_pointer’ (destroy) (_ptr); \ ^~~~~~~ ges-base-xml-formatter.c:356:35: error: function called through a non-compatible type [-Werror] g_clear_pointer (&priv->layers, (GDestroyNotify) g_hash_table_unref); /usr/include/glib-2.0/glib/gmem.h:121:8: note: in definition of macro ‘g_clear_pointer’ (destroy) (_ptr); \ ^~~~~~~ In file included from /usr/include/glib-2.0/glib/glist.h:32, from /usr/include/glib-2.0/glib/ghash.h:33, from /usr/include/glib-2.0/glib.h:50, from ges.h:24, from ges-xml-formatter.c:28: ges-xml-formatter.c: In function ‘_dispose’: ges-xml-formatter.c:1635:7: error: function called through a non-compatible type [-Werror] (GDestroyNotify) g_hash_table_unref); /usr/include/glib-2.0/glib/gmem.h:121:8: note: in definition of macro ‘g_clear_pointer’ (destroy) (_ptr); \ ^~~~~~~
Most likely related to this change : https://gitlab.gnome.org/GNOME/glib/issues/1425 Remove the cast to GDestroyNotify should fix the issue
Thanks, that fixes it indeed. commit ee7c2d07b86aad60edf4aad77174c583c90e67de (HEAD -> master, origin/master, origin/HEAD) Author: Sebastian Dröge <sebastian@centricular.com> Date: Mon Oct 22 08:13:07 2018 +0100 ges: Fix compilation with latest GLib g_clear_pointer() is now preserving the type of its arguments for the free function. ges-xml-formatter.c: In function ‘_dispose’: ges-xml-formatter.c:1635:7: error: function called through a non-compatible type [-Werror] (GDestroyNotify) g_hash_table_unref); /usr/include/glib-2.0/glib/gmem.h:121:8: note: in definition of macro ‘g_clear_pointer’ (destroy) (_ptr); \ ^~~~~~~ https://bugzilla.gnome.org/show_bug.cgi?id=797310
And backported to 1.14