[Piglit] [PATCH] s3tc-errors: Fix GCC compiler warnings.

Brian Paul brianp at vmware.com
Thu Feb 27 06:22:28 PST 2014


On 02/26/2014 06:08 PM, Vinson Lee wrote:
> The params argument in glGetTexLevelParameteriv is of type GLint*.
>
> This patch fixes these GCC warnings introduced with commit
> 4f9d98dbaea90c11a930fd774382ff364892ce3f.
>
> s3tc-errors.c:156:6: warning: passing argument 4 of ‘piglit_dispatch_glGetTexLevelParameteriv’ from incompatible pointer type [enabled by default]
>        &is_compressed);
>        ^
> s3tc-errors.c:156:6: note: expected ‘GLint *’ but argument is of type ‘_Bool *’
> s3tc-errors.c:158:6: warning: pointer targets in passing argument 4 of ‘piglit_dispatch_glGetTexLevelParameteriv’ differ in signedness [-Wpointer-sign]
>        &format);
>        ^
> s3tc-errors.c:158:6: note: expected ‘GLint *’ but argument is of type ‘GLenum *’
> s3tc-errors.c:161:6: warning: pointer targets in passing argument 4 of ‘piglit_dispatch_glGetTexLevelParameteriv’ differ in signedness [-Wpointer-sign]
>        &compressed_size);
>        ^
> s3tc-errors.c:161:6: note: expected ‘GLint *’ but argument is of type ‘GLuint *’
>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
>   tests/texturing/s3tc-errors.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tests/texturing/s3tc-errors.c b/tests/texturing/s3tc-errors.c
> index 19a871b..45403d2 100644
> --- a/tests/texturing/s3tc-errors.c
> +++ b/tests/texturing/s3tc-errors.c
> @@ -133,9 +133,9 @@ test_format(int width, int height, GLfloat *image, GLenum requested_format)
>   	GLuint tex;
>   	bool pass = true;
>   	GLuint expected_size;
> -	bool is_compressed;
> -	GLuint compressed_size;
> -	GLenum format;
> +	GLint is_compressed;
> +	GLint compressed_size;
> +	GLint format;
>
>   	glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
>   	glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
>

Reviewed-by: Brian Paul <brianp at vmware.com>



More information about the Piglit mailing list