gst-libs sdp: Function cast warnings in GCC 8
@fraxinas
Submitted by Andreas Frisch Link to original bug (#796230)
Description
/home/fraxinas/gst/master/gst-plugins-base/gst-libs/gst/sdp/gstsdpmessage.h: In function 'glib_listautoptr_cleanup_GstSDPMessage':
/usr/include/glib-2.0/glib/gmacros.h:462:99: warning: cast between incompatible function types from 'GstSDPResult ()(GstSDPMessage )' {aka 'enum <anonymous>
()(struct <anonymous>
)'} to 'void ()(void )' [-Wcast-function-type]
static inline void _GLIB_AUTOPTR_LIST_FUNC_NAME(TypeName) (GList **_l) { g_list_free_full (_l, (GDestroyNotify) func); } \
^
/home/fraxinas/gst/master/gst-plugins-base/gst-libs/gst/sdp/gstsdpmessage.h:756:1: note: in expansion of macro 'G_DEFINE_AUTOPTR_CLEANUP_FUNC'
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstSDPMessage, gst_sdp_message_free)
^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/fraxinas/gst/master/gst-plugins-base/gst-libs/gst/sdp/gstsdpmessage.h: In function 'glib_slistautoptr_cleanup_GstSDPMessage':
/usr/include/glib-2.0/glib/gmacros.h:463:102: warning: cast between incompatible function types from 'GstSDPResult ()(GstSDPMessage )' {aka 'enum <anonymous>
()(struct <anonymous>
)'} to 'void ()(void )' [-Wcast-function-type]
static inline void _GLIB_AUTOPTR_SLIST_FUNC_NAME(TypeName) (GSList **_l) { g_slist_free_full (_l, (GDestroyNotify) func); } \
^
/home/fraxinas/gst/master/gst-plugins-base/gst-libs/gst/sdp/gstsdpmessage.h:756:1: note: in expansion of macro 'G_DEFINE_AUTOPTR_CLEANUP_FUNC'
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstSDPMessage, gst_sdp_message_free)
^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This happens after upgrading from gcc 7.3.1+20180406-1 to 8.1.0-1
From https://gcc.gnu.org/gcc-8/changes.html
-Wcast-function-type warns when a function pointer is cast to an incompatible function pointer. This warning is enabled by -Wextra.
1.4.0, 1.4.1 and master are all affected.