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

Chad Versace chad.versace at linux.intel.com
Mon Jan 14 10:16:55 PST 2013


Thanks. Patch is committed.

On 01/09/2013 09:53 PM, Tom Gall wrote:
> 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);
>  }
>  
>  
> 



More information about the Piglit mailing list