[Piglit] [PATCH] util: Fix texture name returned by piglit_integer_texture()

Chad Versace chad.versace at intel.com
Mon Apr 25 21:49:40 UTC 2016


The function always returned texture name 0.  Fix to to return the
actual texture name.

Found by GCC warning:
    tests/util/piglit-util-gl.c:2623:1: warning: control reaches end of
         non-void function [-Wreturn-type]
---
 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 09eb99d..b288a67 100644
--- a/tests/util/piglit-util-gl.c
+++ b/tests/util/piglit-util-gl.c
@@ -2620,6 +2620,8 @@ GLuint piglit_integer_texture(GLenum internalFormat, int w, int h, int b, int a)
 		     GL_RGBA_INTEGER, GL_INT, img);
 
 	free(img);
+
+	return tex;
 }
 
 /**
-- 
2.8.1



More information about the Piglit mailing list