From 6e9d0ac61b1ae5829c926255e67f6d5d375095d8 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Mon, 26 Aug 2019 22:19:13 +1000 Subject: [PATCH] uvch264: fix werror build with clang ../subprojects/gst-plugins-bad/sys/uvch264/gstuvch264deviceprovider.c:48:1: warning: unused function 'GST__UVC_H264_DEVICE' [-Wunused-function] G_DECLARE_FINAL_TYPE (GstUvcH264Device, gst_uvc_h264_device, GST_, ^ /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) { \ ^ :75:1: note: expanded from here GST__UVC_H264_DEVICE ^ ../subprojects/gst-plugins-bad/sys/uvch264/gstuvch264deviceprovider.c:48:1: warning: unused function 'GST__IS_UVC_H264_DEVICE' [-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) { \ ^ :78:1: note: expanded from here GST__IS_UVC_H264_DEVICE ^ ../subprojects/gst-plugins-bad/sys/uvch264/gstuvch264deviceprovider.c:139:1: warning: unused function 'GST_UVC_H264_DEVICE_PROVIDER' [-Wunused-function] G_DECLARE_FINAL_TYPE (GstUvcH264DeviceProvider, gst_uvc_h264_device_provider, GST, UVC_H264_DEVICE_PROVIDER, GstDeviceProvider) ^ /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) { \ ^ :137:1: note: expanded from here GST_UVC_H264_DEVICE_PROVIDER ^ ../subprojects/gst-plugins-bad/sys/uvch264/gstuvch264deviceprovider.c:139:1: warning: unused function 'GST_IS_UVC_H264_DEVICE_PROVIDER' [-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) { \ ^ :140:1: note: expanded from here GST_IS_UVC_H264_DEVICE_PROVIDER ^ --- sys/uvch264/gstuvch264deviceprovider.c | 7 +----- sys/uvch264/gstuvch264deviceprovider.h | 30 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 sys/uvch264/gstuvch264deviceprovider.h diff --git a/sys/uvch264/gstuvch264deviceprovider.c b/sys/uvch264/gstuvch264deviceprovider.c index f457670b82..f27a72b24f 100644 --- a/sys/uvch264/gstuvch264deviceprovider.c +++ b/sys/uvch264/gstuvch264deviceprovider.c @@ -37,6 +37,7 @@ #include "uvc_h264.h" #include +#include "gstuvch264deviceprovider.h" enum { @@ -45,9 +46,6 @@ enum /* *INDENT-OFF* */ -G_DECLARE_FINAL_TYPE (GstUvcH264Device, gst_uvc_h264_device, GST_, - UVC_H264_DEVICE, GstDevice) - struct _GstUvcH264Device { GstDevice parent; @@ -134,10 +132,7 @@ gst_uvc_h264_device_init (GstUvcH264Device * device) { } - /* *INDENT-OFF* */ -G_DECLARE_FINAL_TYPE (GstUvcH264DeviceProvider, gst_uvc_h264_device_provider, GST, UVC_H264_DEVICE_PROVIDER, GstDeviceProvider) - struct _GstUvcH264DeviceProvider { GstDeviceProvider parent; diff --git a/sys/uvch264/gstuvch264deviceprovider.h b/sys/uvch264/gstuvch264deviceprovider.h new file mode 100644 index 0000000000..599dad72bc --- /dev/null +++ b/sys/uvch264/gstuvch264deviceprovider.h @@ -0,0 +1,30 @@ +/* GStreamer + * Copyright (C) 2019 Thibault Saunier + * + * gstuvc_h264deviceprovider.c: UvcH264 device probing and monitoring + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include + +G_BEGIN_DECLS + +G_DECLARE_FINAL_TYPE (GstUvcH264Device, gst_uvc_h264_device, GST, UVC_H264_DEVICE, GstDevice) + +G_DECLARE_FINAL_TYPE (GstUvcH264DeviceProvider, gst_uvc_h264_device_provider, GST, UVC_H264_DEVICE_PROVIDER, GstDeviceProvider) + +G_END_DECLS