Commit 82a970f4 authored by Thibault Saunier's avatar Thibault Saunier 🌵

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
^
parent 2e8528bb
Pipeline #59243 passed with stages
in 71 minutes and 54 seconds
......@@ -30,8 +30,9 @@
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
{
GstBinClass parent_class;
......
......@@ -47,7 +47,7 @@
GST_DEBUG_CATEGORY_STATIC (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
{
......@@ -626,6 +626,9 @@ ges_demux_init (GESDemux * self)
{
ges_init ();
SUPRESS_UNUSED_WARNING (GES_DEMUX);
SUPRESS_UNUSED_WARNING (GES_IS_DEMUX);
self->sinkpad =
gst_pad_new_from_template (gst_element_get_pad_template (GST_ELEMENT
(self), "sink"), "sink");
......
......@@ -122,4 +122,6 @@ ges_src_class_init (GESSrcClass * self_class)
static void
ges_src_init (GESSrc * self)
{
SUPRESS_UNUSED_WARNING (GES_SRC);
SUPRESS_UNUSED_WARNING (GES_IS_SRC);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment