[Piglit] [PATCH] util: Silence GCC unused-function warning.

Vinson Lee vlee at freedesktop.org
Tue Jun 5 22:41:09 UTC 2018


piglit-util-gl.c:1941:1: warning: ‘read_texture_via_fbo’ defined but not used [-Wunused-function]
 read_texture_via_fbo(int target, int level, int x, int y, int layer, int w,
 ^~~~~~~~~~~~~~~~~~~~

Fixes: 77a4b73436c0 ("util: provide way to read a texture in ES compatible way")
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 tests/util/piglit-util-gl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/util/piglit-util-gl.c b/tests/util/piglit-util-gl.c
index 9b0f88a3697e..11e7d4b1da4d 100644
--- a/tests/util/piglit-util-gl.c
+++ b/tests/util/piglit-util-gl.c
@@ -1894,6 +1894,7 @@ piglit_probe_image_ubyte(int x, int y, int w, int h, GLenum format,
 	return 1;
 }
 
+#ifndef PIGLIT_USE_OPENGL
 static GLuint
 create_fbo_from_texture(GLenum target, GLint texture, GLint level, GLint layer)
 {
@@ -1995,6 +1996,7 @@ read_texture_via_fbo(int target, int level, int x, int y, int layer, int w,
 
 	return buffer;
 }
+#endif
 
 
 /**
-- 
2.14.1



More information about the Piglit mailing list