ges: fix G_DECLARE_FINAL_TYPE -Werror with clang

Also fix wrong casing the `G_DECLARE` for GESDemux.

../subprojects/gst-editing-services/plugins/ges/gessrc.c:56:1: warning: unused function 'GES_SRC' [-Wunused-function]
G_DECLARE_FINAL_TYPE (GESSrc, ges_src, GES, SRC, GESBaseBin);
^
/usr/include/glib-2.0/gobject/gtype.h:1405:33: note: expanded from macro 'G_DECLARE_FINAL_TYPE'
static inline ModuleObjName * MODULE##_##OBJ_NAME (gpointer ptr) {                                     \
                              ^
<scratch space>:39:1: note: expanded from here
GES_SRC
^
../subprojects/gst-editing-services/plugins/ges/gessrc.c:56:1: warning: unused function 'GES_IS_SRC' [-Wunused-function]
/usr/include/glib-2.0/gobject/gtype.h:1407:26: note: expanded from macro 'G_DECLARE_FINAL_TYPE'
static inline gboolean MODULE##_IS_##OBJ_NAME (gpointer ptr) {                                         \
                        ^
<scratch space>:42:1: note: expanded from here
GES_IS_SRC
^

../subprojects/gst-editing-services/plugins/ges/gesdemux.c:50:1: warning: unused function 'GES_Demux' [-Wunused-function]
G_DECLARE_FINAL_TYPE (GESDemux, ges_demux, GES, Demux, GESBaseBin);
^
/usr/include/glib-2.0/gobject/gtype.h:1405:33: note: expanded from macro 'G_DECLARE_FINAL_TYPE'
static inline ModuleObjName * MODULE##_##OBJ_NAME (gpointer ptr) {                                     \
                              ^
<scratch space>:72:1: note: expanded from here
GES_Demux
^
../subprojects/gst-editing-services/plugins/ges/gesdemux.c:50:1: warning: unused function 'GES_IS_Demux' [-Wunused-function]
/usr/include/glib-2.0/gobject/gtype.h:1407:26: note: expanded from macro 'G_DECLARE_FINAL_TYPE'
static inline gboolean MODULE##_IS_##OBJ_NAME (gpointer ptr) {                                         \
                        ^
<scratch space>:75:1: note: expanded from here
GES_IS_Demux
^
This commit is contained in:
Thibault Saunier 2019-08-27 10:02:04 -04:00
parent 2e8528bb40
commit 82a970f415
3 changed files with 8 additions and 2 deletions

View file

@ -30,8 +30,9 @@
G_BEGIN_DECLS G_BEGIN_DECLS
G_DECLARE_DERIVABLE_TYPE(GESBaseBin, ges_base_bin, GES, BASE_BIN, GstBin) #define SUPRESS_UNUSED_WARNING(a) (void)a
G_DECLARE_DERIVABLE_TYPE(GESBaseBin, ges_base_bin, GES, BASE_BIN, GstBin)
struct _GESBaseBinClass struct _GESBaseBinClass
{ {
GstBinClass parent_class; GstBinClass parent_class;

View file

@ -47,7 +47,7 @@
GST_DEBUG_CATEGORY_STATIC (gesdemux); GST_DEBUG_CATEGORY_STATIC (gesdemux);
#define GST_CAT_DEFAULT gesdemux #define GST_CAT_DEFAULT gesdemux
G_DECLARE_FINAL_TYPE (GESDemux, ges_demux, GES, Demux, GESBaseBin); G_DECLARE_FINAL_TYPE (GESDemux, ges_demux, GES, DEMUX, GESBaseBin);
struct _GESDemux struct _GESDemux
{ {
@ -626,6 +626,9 @@ ges_demux_init (GESDemux * self)
{ {
ges_init (); ges_init ();
SUPRESS_UNUSED_WARNING (GES_DEMUX);
SUPRESS_UNUSED_WARNING (GES_IS_DEMUX);
self->sinkpad = self->sinkpad =
gst_pad_new_from_template (gst_element_get_pad_template (GST_ELEMENT gst_pad_new_from_template (gst_element_get_pad_template (GST_ELEMENT
(self), "sink"), "sink"); (self), "sink"), "sink");

View file

@ -122,4 +122,6 @@ ges_src_class_init (GESSrcClass * self_class)
static void static void
ges_src_init (GESSrc * self) ges_src_init (GESSrc * self)
{ {
SUPRESS_UNUSED_WARNING (GES_SRC);
SUPRESS_UNUSED_WARNING (GES_IS_SRC);
} }