[Piglit] [PATCH] s3tc-errors: Fix GCC unused-function warning.

Vinson Lee vlee at freedesktop.org
Mon May 6 17:02:34 UTC 2019


s3tc-errors.c:155:1: warning: ‘check_gl_error2_’ defined but not used [-Wunused-function]
 check_gl_error2_(GLenum err1, GLenum err2, int line)
 ^~~~~~~~~~~~~~~~

Fixes: Fixes: d433792407e7 ("s3tc-errors: port to gles31")
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 tests/texturing/s3tc-errors.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/texturing/s3tc-errors.c b/tests/texturing/s3tc-errors.c
index 6b2658c9a1d1..a356ea2149ce 100644
--- a/tests/texturing/s3tc-errors.c
+++ b/tests/texturing/s3tc-errors.c
@@ -147,6 +147,7 @@ check_rendering_(int width, int height, int line)
 #define check_rendering(w, h) check_rendering_(w, h, __LINE__)
 
 
+#ifdef PIGLIT_USE_OPENGL
 /**
  * Check for either of two expected GL errors.
  * XXX this could be a piglit util function
@@ -164,6 +165,7 @@ check_gl_error2_(GLenum err1, GLenum err2, int line)
 }
 
 #define check_gl_error2(err1, err2)  check_gl_error2_(err1, err2, __LINE__)
+#endif
 
 
 static bool
-- 
2.19.1



More information about the Piglit mailing list