Fails to build in the master GNOME Sdk
Here's what I get when trying to build GNOME Clocks (which bundles gsound) :
gsound-context.c: In function ‘gsound_context_set_attributes’:
/usr/include/glib-2.0/glib/gmem.h:120:31: error: cast between incompatible function types from ‘int (*)(ca_proplist *)’ {aka ‘int (*)(struct ca_proplist *)’} to ‘void (*)(void *)’ [-Werror=cast-function-type]
GDestroyNotify _destroy = (GDestroyNotify) (destroy); \
^
gsound-context.c:359:3: note: in expansion of macro ‘g_clear_pointer’
g_clear_pointer (&pl, ca_proplist_destroy);
^~~~~~~~~~~~~~~
gsound-context.c: In function ‘gsound_context_set_attributesv’:
/usr/include/glib-2.0/glib/gmem.h:120:31: error: cast between incompatible function types from ‘int (*)(ca_proplist *)’ {aka ‘int (*)(struct ca_proplist *)’} to ‘void (*)(void *)’ [-Werror=cast-function-type]
GDestroyNotify _destroy = (GDestroyNotify) (destroy); \
^
gsound-context.c:399:3: note: in expansion of macro ‘g_clear_pointer’
g_clear_pointer (&pl, ca_proplist_destroy);
^~~~~~~~~~~~~~~
gsound-context.c: In function ‘gsound_context_play_simple’:
/usr/include/glib-2.0/glib/gmem.h:120:31: error: cast between incompatible function types from ‘int (*)(ca_proplist *)’ {aka ‘int (*)(struct ca_proplist *)’} to ‘void (*)(void *)’ [-Werror=cast-function-type]
GDestroyNotify _destroy = (GDestroyNotify) (destroy); \
^
gsound-context.c:451:3: note: in expansion of macro ‘g_clear_pointer’
g_clear_pointer (&pl, ca_proplist_destroy);
^~~~~~~~~~~~~~~
gsound-context.c: In function ‘gsound_context_play_simplev’:
/usr/include/glib-2.0/glib/gmem.h:120:31: error: cast between incompatible function types from ‘int (*)(ca_proplist *)’ {aka ‘int (*)(struct ca_proplist *)’} to ‘void (*)(void *)’ [-Werror=cast-function-type]
GDestroyNotify _destroy = (GDestroyNotify) (destroy); \
^
gsound-context.c:501:3: note: in expansion of macro ‘g_clear_pointer’
g_clear_pointer (&pl, ca_proplist_destroy);
^~~~~~~~~~~~~~~
gsound-context.c: In function ‘gsound_context_play_full’:
/usr/include/glib-2.0/glib/gmem.h:120:31: error: cast between incompatible function types from ‘int (*)(ca_proplist *)’ {aka ‘int (*)(struct ca_proplist *)’} to ‘void (*)(void *)’ [-Werror=cast-function-type]
GDestroyNotify _destroy = (GDestroyNotify) (destroy); \
^
gsound-context.c:563:3: note: in expansion of macro ‘g_clear_pointer’
g_clear_pointer (&proplist, ca_proplist_destroy);
^~~~~~~~~~~~~~~
gsound-context.c: In function ‘gsound_context_play_fullv’:
/usr/include/glib-2.0/glib/gmem.h:120:31: error: cast between incompatible function types from ‘int (*)(ca_proplist *)’ {aka ‘int (*)(struct ca_proplist *)’} to ‘void (*)(void *)’ [-Werror=cast-function-type]
GDestroyNotify _destroy = (GDestroyNotify) (destroy); \
^
gsound-context.c:628:3: note: in expansion of macro ‘g_clear_pointer’
g_clear_pointer (&proplist, ca_proplist_destroy);
^~~~~~~~~~~~~~~
gsound-context.c: In function ‘gsound_context_cache’:
/usr/include/glib-2.0/glib/gmem.h:120:31: error: cast between incompatible function types from ‘int (*)(ca_proplist *)’ {aka ‘int (*)(struct ca_proplist *)’} to ‘void (*)(void *)’ [-Werror=cast-function-type]
GDestroyNotify _destroy = (GDestroyNotify) (destroy); \
^
gsound-context.c:690:3: note: in expansion of macro ‘g_clear_pointer’
g_clear_pointer (&pl, ca_proplist_destroy);
^~~~~~~~~~~~~~~
gsound-context.c: In function ‘gsound_context_cachev’:
/usr/include/glib-2.0/glib/gmem.h:120:31: error: cast between incompatible function types from ‘int (*)(ca_proplist *)’ {aka ‘int (*)(struct ca_proplist *)’} to ‘void (*)(void *)’ [-Werror=cast-function-type]
GDestroyNotify _destroy = (GDestroyNotify) (destroy); \
^
gsound-context.c:720:3: note: in expansion of macro ‘g_clear_pointer’
g_clear_pointer (&proplist, ca_proplist_destroy);
^~~~~~~~~~~~~~~
gsound-context.c: In function ‘gsound_context_real_init’:
/usr/include/glib-2.0/glib/gmem.h:120:31: error: cast between incompatible function types from ‘int (*)(ca_proplist *)’ {aka ‘int (*)(struct ca_proplist *)’} to ‘void (*)(void *)’ [-Werror=cast-function-type]
GDestroyNotify _destroy = (GDestroyNotify) (destroy); \
^
gsound-context.c:755:3: note: in expansion of macro ‘g_clear_pointer’
g_clear_pointer (&pl, ca_proplist_destroy);
^~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gmem.h:120:31: error: cast between incompatible function types from ‘int (*)(ca_context *)’ {aka ‘int (*)(struct ca_context *)’} to ‘void (*)(void *)’ [-Werror=cast-function-type]
GDestroyNotify _destroy = (GDestroyNotify) (destroy); \
^
gsound-context.c:758:7: note: in expansion of macro ‘g_clear_pointer’
g_clear_pointer (&self->ca, ca_context_destroy);
^~~~~~~~~~~~~~~
gsound-context.c: In function ‘gsound_context_finalize’:
/usr/include/glib-2.0/glib/gmem.h:120:31: error: cast between incompatible function types from ‘int (*)(ca_context *)’ {aka ‘int (*)(struct ca_context *)’} to ‘void (*)(void *)’ [-Werror=cast-function-type]
GDestroyNotify _destroy = (GDestroyNotify) (destroy); \
^
gsound-context.c:768:3: note: in expansion of macro ‘g_clear_pointer’
g_clear_pointer (&self->ca, ca_context_destroy);
^~~~~~~~~~~~~~~
You can reproduce it easily:
$ git clone git@gitlab.gnome.org:GNOME/gnome-clocks
$ cd gnome-clocks
$ git checkout bochecha/flatpak-gitlab # Only necessary until https://gitlab.gnome.org/GNOME/gnome-clocks/merge_requests/2 is merged
$ flatpak-builder --force-clean --ccache app data/flatpak/org.gnome.clocks.json