[Piglit] [PATCH] util: Fix texture name returned by piglit_integer_texture()

Nicolai Hähnle nhaehnle at gmail.com
Mon Apr 25 23:57:49 UTC 2016


Hi Chad,

I saw Matt's email and went ahead and just did this before seeing your 
email. Sorry about that!

Nicolai

On 25.04.2016 16:49, Chad Versace wrote:
> The function always returned texture name 0.  Fix to to return the
> actual texture name.
>
> Found by GCC warning:
>      tests/util/piglit-util-gl.c:2623:1: warning: control reaches end of
>           non-void function [-Wreturn-type]
> ---
>   tests/util/piglit-util-gl.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/tests/util/piglit-util-gl.c b/tests/util/piglit-util-gl.c
> index 09eb99d..b288a67 100644
> --- a/tests/util/piglit-util-gl.c
> +++ b/tests/util/piglit-util-gl.c
> @@ -2620,6 +2620,8 @@ GLuint piglit_integer_texture(GLenum internalFormat, int w, int h, int b, int a)
>   		     GL_RGBA_INTEGER, GL_INT, img);
>
>   	free(img);
> +
> +	return tex;
>   }
>
>   /**
>


More information about the Piglit mailing list