[Piglit] [PATCH] texture-storage: Remove unused variable.

Brian Paul brianp at vmware.com
Thu Dec 1 06:36:31 PST 2011


On 11/30/2011 03:21 PM, Vinson Lee wrote:
> Fixes this GCC warning.
> texture-storage.c: In function ‘test_one_level_errors’:
> texture-storage.c:59:14: warning: variable ‘targetString’ set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: Vinson Lee<vlee at vmware.com>
> ---
>   tests/spec/arb_texture_storage/texture-storage.c |    4 ----
>   1 files changed, 0 insertions(+), 4 deletions(-)
>
> diff --git a/tests/spec/arb_texture_storage/texture-storage.c b/tests/spec/arb_texture_storage/texture-storage.c
> index f72433c..58b0672 100644
> --- a/tests/spec/arb_texture_storage/texture-storage.c
> +++ b/tests/spec/arb_texture_storage/texture-storage.c
> @@ -56,7 +56,6 @@ static GLboolean
>   test_one_level_errors(GLenum target)
>   {
>   	const GLint width = 64, height = 4, depth = 8;
> -	const char *targetString = "";
>   	GLuint tex;
>   	GLint v;
>
> @@ -69,15 +68,12 @@ test_one_level_errors(GLenum target)
>
>   	if (target == GL_TEXTURE_1D) {
>   		glTexStorage1D(target, 1, GL_RGBA, width);
> -		targetString = "GL_TEXTURE_1D";
>   	}
>   	else if (target == GL_TEXTURE_2D) {
>   		glTexStorage2D(target, 1, GL_RGBA, width, height);
> -		targetString = "GL_TEXTURE_2D";
>   	}
>   	else if (target == GL_TEXTURE_3D) {
>   		glTexStorage3D(target, 1, GL_RGBA, width, height, depth);
> -		targetString = "GL_TEXTURE_3D";
>   	}
>
>   	glGetTexLevelParameteriv(target, 0, GL_TEXTURE_WIDTH,&v);

When I wrote the test I intended to put the targetString in the error 
message when there was a failure.  Guess I missed that bit.  Removing 
it is fine.

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


More information about the Piglit mailing list