[Piglit] [PATCH 1/1] gles2: squash warning

Tom Gall tom.gall at linaro.org
Wed Jan 9 21:53:22 PST 2013


In the newly added piglit_gen_ortho_uniform it introduced a
warning due to float *[4] being passed instead of the expected
const GLfloat * as the type of the 4th param. Change the array
of floats to const GLfloat [4][4] and provide the cast.

Signed-off-by: Tom Gall <tom.gall at linaro.org>
---
 tests/util/piglit-util-gl-common.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/util/piglit-util-gl-common.c b/tests/util/piglit-util-gl-common.c
index 92a0a4d..7674d4e 100644
--- a/tests/util/piglit-util-gl-common.c
+++ b/tests/util/piglit-util-gl-common.c
@@ -538,13 +538,13 @@ void
 piglit_gen_ortho_uniform(GLint location, double l, double r, double b,
 			 double t, double n, double f)
 {
-	float values[4][4] = {
+	const GLfloat values[4][4] = {
 		{ 2/(r-l),    0,        0,    -(r+l)/(r-l) },
 		{    0,    2/(t-b),     0,    -(t+b)/(t-b) },
 		{    0,       0,    -2/(f-n), -(f+n)/(f-n) },
 		{    0,       0,        0,          1      }
 	};
-	glUniformMatrix4fv(location, 1, GL_TRUE, values);
+	glUniformMatrix4fv(location, 1, GL_TRUE, (const GLfloat *)values);
 }
 
 
-- 
1.7.10.4



More information about the Piglit mailing list