diff mbox

[1/1] gles2: squash warning

Message ID 1357933566-23290-1-git-send-email-tom.gall@linaro.org
State Accepted
Headers show

Commit Message

Tom Gall Jan. 11, 2013, 7:46 p.m. UTC
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@linaro.org>
---
 tests/util/piglit-util-gl-common.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

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);
 }