[Piglit] [PATCH] textureSize: Silence GCC maybe-uninitialized warning.
Vinson Lee
vlee at freedesktop.org
Thu Jan 8 12:42:32 PST 2015
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;
--
2.2.0
More information about the Piglit
mailing list