[Piglit] [PATCH] textureSize: Silence GCC maybe-uninitialized warning.
Ian Romanick
idr at freedesktop.org
Wed May 31 19:54:18 UTC 2017
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
On 01/08/2015 12:42 PM, Vinson Lee wrote:
> textureSize.c: In function 'generate_GLSL':
> textureSize.c:367:22: warning: 'gs' may be used uninitialized in this function [-Wmaybe-uninitialized]
> if (!vs || (gs_code && !gs) || !fs)
> ^
>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
> tests/texturing/shaders/textureSize.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/texturing/shaders/textureSize.c b/tests/texturing/shaders/textureSize.c
> index ee64b07..4013b49 100644
> --- a/tests/texturing/shaders/textureSize.c
> +++ b/tests/texturing/shaders/textureSize.c
> @@ -247,7 +247,7 @@ has_lod(void)
> int
> generate_GLSL(enum shader_target test_stage)
> {
> - int vs, gs, fs;
> + int vs, gs = 0, fs;
> int prog;
>
> static char *vs_code;
>
More information about the Piglit
mailing list