aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gall <tom.gall@linaro.org>2013-01-09 23:53:22 -0600
committerChad Versace <chad.versace@linux.intel.com>2013-01-14 10:15:42 -0800
commite057cf0c0dfc413010f9c45fbb49badcc1a05c62 (patch)
tree4c91f0add00b494fdce08f6df4d3cccf19ce3531
parent8973ca0ba3356271e0b6917e1614d91eb3ece979 (diff)
util/gl: squash "incompatible pointer type" warning
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. Fixes the GCC warning: tests/util/piglit-util-gl-common.c:547:2: warning: passing argument 4 of ‘glUniformMatrix4fv’ from incompatible pointer type [enabled by default] Signed-off-by: Tom Gall <tom.gall@linaro.org> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
-rw-r--r--tests/util/piglit-util-gl-common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/util/piglit-util-gl-common.c b/tests/util/piglit-util-gl-common.c
index 92a0a4d3..7674d4eb 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);
}