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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4741>
This commit is contained in:
Matthew Waters 2023-05-31 13:39:59 +10:00 committed by GStreamer Marge Bot
parent 74f914077d
commit cd4b84b60b

View file

@ -311,7 +311,9 @@ GST_END_TEST
static Suite * static Suite *
gl_launch_lines_suite (void) gl_launch_lines_suite (void)
{ {
#if GST_GL_HAVE_OPENGL
gboolean have_gldifferencematte; gboolean have_gldifferencematte;
#endif
gboolean have_gloverlay; gboolean have_gloverlay;
Suite *s = suite_create ("OpenGL pipelines"); Suite *s = suite_create ("OpenGL pipelines");
@ -320,10 +322,11 @@ gl_launch_lines_suite (void)
/* time out after 60s, not the default 3 */ /* time out after 60s, not the default 3 */
tcase_set_timeout (tc_chain, 60); tcase_set_timeout (tc_chain, 60);
#if GST_GL_HAVE_OPENGL
have_gldifferencematte = have_gldifferencematte =
gst_registry_check_feature_version (gst_registry_get (), gst_registry_check_feature_version (gst_registry_get (),
"gldifferencematte", GST_VERSION_MAJOR, GST_VERSION_MINOR, 0); "gldifferencematte", GST_VERSION_MAJOR, GST_VERSION_MINOR, 0);
#endif
have_gloverlay = have_gloverlay =
gst_registry_check_feature_version (gst_registry_get (), gst_registry_check_feature_version (gst_registry_get (),
"gloverlay", GST_VERSION_MAJOR, GST_VERSION_MINOR, 0); "gloverlay", GST_VERSION_MAJOR, GST_VERSION_MINOR, 0);