From cd4b84b60b590d82080179f561124b2b69b95cdc Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Wed, 31 May 2023 13:39:59 +1000 Subject: [PATCH] gl/tests: fix unused-but-set warning if built with gles2-only ../tests/check/pipelines/gl-launch-lines.c:314:12: error: variable 'have_gldifferencematte' set but not used [-Werror,-Wunused-but-set-variable] gboolean have_gldifferencematte; ^ 1 error generated. Part-of: --- .../gst-plugins-base/tests/check/pipelines/gl-launch-lines.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-base/tests/check/pipelines/gl-launch-lines.c b/subprojects/gst-plugins-base/tests/check/pipelines/gl-launch-lines.c index 978bedde5d..fd9e603868 100644 --- a/subprojects/gst-plugins-base/tests/check/pipelines/gl-launch-lines.c +++ b/subprojects/gst-plugins-base/tests/check/pipelines/gl-launch-lines.c @@ -311,7 +311,9 @@ GST_END_TEST static Suite * gl_launch_lines_suite (void) { +#if GST_GL_HAVE_OPENGL gboolean have_gldifferencematte; +#endif gboolean have_gloverlay; Suite *s = suite_create ("OpenGL pipelines"); @@ -320,10 +322,11 @@ gl_launch_lines_suite (void) /* time out after 60s, not the default 3 */ tcase_set_timeout (tc_chain, 60); +#if GST_GL_HAVE_OPENGL have_gldifferencematte = gst_registry_check_feature_version (gst_registry_get (), "gldifferencematte", GST_VERSION_MAJOR, GST_VERSION_MINOR, 0); - +#endif have_gloverlay = gst_registry_check_feature_version (gst_registry_get (), "gloverlay", GST_VERSION_MAJOR, GST_VERSION_MINOR, 0);