From 9249f60b709c6d1bc2e752bd8d96dde7e304cf17 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Mon, 26 Aug 2019 21:43:24 +1000 Subject: [PATCH] validate: fix -Werror=unused-function with clang [3623/4053] Compiling C object 'subprojects/gst-devtools/validate/plugins/flow/697521d@@gstvalidateflow@sha/gstvalidateflow.c.o'. ../subprojects/gst-devtools/validate/plugins/flow/gstvalidateflow.c:85:1: warning: unused function 'VALIDATE_IS_FLOW_OVERRIDE' [-Wunused-function] G_DECLARE_FINAL_TYPE (ValidateFlowOverride, validate_flow_override, ^ /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) { \ ^ :129:1: note: expanded from here VALIDATE_IS_FLOW_OVERRIDE ^ --- validate/plugins/flow/gstvalidateflow.c | 4 +-- validate/plugins/flow/gstvalidateflow.h | 34 +++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 validate/plugins/flow/gstvalidateflow.h diff --git a/validate/plugins/flow/gstvalidateflow.c b/validate/plugins/flow/gstvalidateflow.c index ad6f859865..07d2e51038 100644 --- a/validate/plugins/flow/gstvalidateflow.c +++ b/validate/plugins/flow/gstvalidateflow.c @@ -37,6 +37,8 @@ #include #include +#include "gstvalidateflow.h" + #define VALIDATE_FLOW_MISMATCH g_quark_from_static_string ("validateflow::mismatch") #define VALIDATE_FLOW_NOT_ATTACHED g_quark_from_static_string ("validateflow::not-attached") @@ -82,8 +84,6 @@ static void runner_stopping (GstValidateRunner * runner, ValidateFlowOverride * flow); #define VALIDATE_TYPE_FLOW_OVERRIDE validate_flow_override_get_type () -G_DECLARE_FINAL_TYPE (ValidateFlowOverride, validate_flow_override, - VALIDATE, FLOW_OVERRIDE, GstValidateOverride); G_DEFINE_TYPE (ValidateFlowOverride, validate_flow_override, GST_TYPE_VALIDATE_OVERRIDE); diff --git a/validate/plugins/flow/gstvalidateflow.h b/validate/plugins/flow/gstvalidateflow.h new file mode 100644 index 0000000000..065c99eb5b --- /dev/null +++ b/validate/plugins/flow/gstvalidateflow.h @@ -0,0 +1,34 @@ +/* GStreamer + * + * Copyright (C) 2018-2019 Igalia S.L. + * Copyright (C) 2018 Metrological Group B.V. + * Author: Alicia Boya GarcĂ­a + * + * gstvalidateflow.c: A plugin to record streams and match them to + * expectation files. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser 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 +#include "../../gst/validate/validate.h" + +G_BEGIN_DECLS + +G_DECLARE_FINAL_TYPE (ValidateFlowOverride, validate_flow_override, + VALIDATE, FLOW_OVERRIDE, GstValidateOverride); + +G_END_DECLS