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

Vinson Lee vlee at freedesktop.org
Mon Jan 28 19:12:40 UTC 2019


s3tc-errors.c: In function ‘test_format’:
s3tc-errors.c:175:9: warning: unused variable ‘format2’ [-Wunused-variable]
  GLenum format2;
         ^~~~~~~

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, 1 insertion(+), 1 deletion(-)

diff --git a/tests/texturing/s3tc-errors.c b/tests/texturing/s3tc-errors.c
index ccc0be9a785f..6b2658c9a1d1 100644
--- a/tests/texturing/s3tc-errors.c
+++ b/tests/texturing/s3tc-errors.c
@@ -171,8 +171,8 @@ test_format(int width, int height, GLfloat *image, GLenum requested_format)
 {
 #ifdef PIGLIT_USE_OPENGL
 	GLubyte *compressed_image;
-#endif
 	GLenum format2;
+#endif
 	int x, y, w, h;
 	GLuint tex;
 	bool pass = true;
-- 
2.19.1



More information about the Piglit mailing list