[Piglit] [PATCH] glsl-link-test: Silence uninitialized variable warning.

Vinson Lee vlee at freedesktop.org
Fri Jan 10 19:21:28 PST 2014


Fix GCC maybe-uninitialized warning.

glsl-link-test.c: In function 'piglit_init':
glsl-link-test.c:124:10: warning: 'expect' may be used uninitialized in this function [-Wmaybe-uninitialized]
   fprintf(stderr,
          ^

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 tests/shaders/glsl-link-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/shaders/glsl-link-test.c b/tests/shaders/glsl-link-test.c
index 6b5c2f9..d4faeae 100644
--- a/tests/shaders/glsl-link-test.c
+++ b/tests/shaders/glsl-link-test.c
@@ -47,7 +47,7 @@ piglit_display(void)
 void piglit_init(int argc, char **argv)
 {
 	GLint program;
-	bool expect;
+	bool expect = false;
 	bool result;
 	unsigned i;
 	const char *invalid_file = NULL;
-- 
1.8.4.2



More information about the Piglit mailing list