From c2bba9e0e5ea6a35f935b18731e5a6880c35edd7 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Wed, 28 Aug 2019 18:13:06 +1000 Subject: [PATCH] build: also suppress unused-function warnings about g_autoptr ../plugins/ges/gesdemux.c:50:1: error: unused function 'glib_autoptr_cleanup_GESDemux' [-Werror,-Wunused-function] G_DECLARE_FINAL_TYPE (GESDemux, ges_demux, GES, DEMUX, GESBaseBin); ^ /home/matt/Projects/cerbero/build/dist/android_universal/x86_64/include/glib-2.0/gobject/gtype.h:1401:3: note: expanded from macro 'G_DECLARE_FINAL_TYPE' _GLIB_DEFINE_AUTOPTR_CHAINUP (ModuleObjName, ParentName) \ ^ /home/matt/Projects/cerbero/build/dist/android_universal/x86_64/include/glib-2.0/glib/gmacros.h:451:22: note: expanded from macro '_GLIB_DEFINE_AUTOPTR_CHAINUP' static inline void _GLIB_AUTOPTR_FUNC_NAME(ModuleObjName) (ModuleObjName **_ptr) { \ ^ /home/matt/Projects/cerbero/build/dist/android_universal/x86_64/include/glib-2.0/glib/gmacros.h:441:43: note: expanded from macro '_GLIB_AUTOPTR_FUNC_NAME' #define _GLIB_AUTOPTR_FUNC_NAME(TypeName) glib_autoptr_cleanup_##TypeName ^ :81:1: note: expanded from here glib_autoptr_cleanup_GESDemux ^ ../plugins/ges/gessrc.c:56:1: error: unused function 'glib_autoptr_cleanup_GESSrc' [-Werror,-Wunused-function] G_DECLARE_FINAL_TYPE (GESSrc, ges_src, GES, SRC, GESBaseBin); ^ /home/matt/Projects/cerbero/build/dist/android_universal/x86_64/include/glib-2.0/gobject/gtype.h:1401:3: note: expanded from macro 'G_DECLARE_FINAL_TYPE' _GLIB_DEFINE_AUTOPTR_CHAINUP (ModuleObjName, ParentName) \ ^ /home/matt/Projects/cerbero/build/dist/android_universal/x86_64/include/glib-2.0/glib/gmacros.h:451:22: note: expanded from macro '_GLIB_DEFINE_AUTOPTR_CHAINUP' static inline void _GLIB_AUTOPTR_FUNC_NAME(ModuleObjName) (ModuleObjName **_ptr) { \ ^ /home/matt/Projects/cerbero/build/dist/android_universal/x86_64/include/glib-2.0/glib/gmacros.h:441:43: note: expanded from macro '_GLIB_AUTOPTR_FUNC_NAME' #define _GLIB_AUTOPTR_FUNC_NAME(TypeName) glib_autoptr_cleanup_##TypeName ^ :158:1: note: expanded from here glib_autoptr_cleanup_GESSrc ^ --- plugins/ges/gesdemux.c | 3 +++ plugins/ges/gessrc.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/plugins/ges/gesdemux.c b/plugins/ges/gesdemux.c index 6856ed2988..150628acd0 100644 --- a/plugins/ges/gesdemux.c +++ b/plugins/ges/gesdemux.c @@ -628,6 +628,9 @@ ges_demux_init (GESDemux * self) SUPRESS_UNUSED_WARNING (GES_DEMUX); SUPRESS_UNUSED_WARNING (GES_IS_DEMUX); +#if defined(g_autoptr) + SUPRESS_UNUSED_WARNING (glib_autoptr_cleanup_GESDemux); +#endif self->sinkpad = gst_pad_new_from_template (gst_element_get_pad_template (GST_ELEMENT diff --git a/plugins/ges/gessrc.c b/plugins/ges/gessrc.c index 2a64a50576..e726c3841e 100644 --- a/plugins/ges/gessrc.c +++ b/plugins/ges/gessrc.c @@ -124,4 +124,7 @@ ges_src_init (GESSrc * self) { SUPRESS_UNUSED_WARNING (GES_SRC); SUPRESS_UNUSED_WARNING (GES_IS_SRC); +#if defined(g_autoptr) + SUPRESS_UNUSED_WARNING (glib_autoptr_cleanup_GESSrc); +#endif }