gst_clear_* functions fail to build, Werror=incompatible-pointer-types
The new gst_clear_*
functions cause the compilation to fail:
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 ../gst_private.h:36,
from parse.l:2:
../../gst/gstcaps.h: In function ‘gst_clear_caps’:
/usr/include/glib-2.0/glib/gmem.h:121:18: error: passing argument 1 of ‘gst_mini_object_unref’ from incompatible pointer type [-Werror=incompatible-pointer-types]
(destroy) (_ptr); \
^~~~
../../gst/gstminiobject.h:239:47: note: in expansion of macro ‘g_clear_pointer’
#define gst_clear_mini_object(object_ptr) g_clear_pointer ((object_ptr), gst_mini_object_unref)
^~~~~~~~~~~~~~~
../../gst/gstcaps.h:242:3: note: in expansion of macro ‘gst_clear_mini_object’
gst_clear_mini_object (caps_ptr);
^~~~~~~~~~~~~~~~~~~~~
In file included from ../../gst/gstbuffer.h:27,
from ../gstpad.h:70,
from ../gst_private.h:55,
from parse.l:2:
../../gst/gstminiobject.h:235:56: note: expected ‘GstMiniObject *’ {aka ‘struct _GstMiniObject *’} but argument is of type ‘GstCaps *’ {aka ‘struct _GstCaps *’}
void gst_mini_object_unref (GstMiniObject *mini_object);
~~~~~~~~~~~~~~~^~~~~~~~~~~
As well as several other instances:
../../gst/gstbuffer.h: In function ‘gst_clear_buffer’:
../../gst/gstbufferlist.h: In function ‘gst_clear_buffer_list’:
../../gst/gsttaglist.h: In function ‘gst_clear_tag_list’:
../../gst/gstquery.h: In function ‘gst_clear_query’:
../../gst/gstmessage.h: In function ‘gst_clear_message’:
../../gst/gstevent.h: In function ‘gst_clear_event’:
Arch Linux
GCC 8.2.1