[Piglit] [PATCH] asmparsertest: Silence uninitialized variable warning.

Vinson Lee vlee at freedesktop.org
Fri Jan 10 19:15:47 PST 2014


Fix GCC maybe-uninitialized warning.

asmparsertest.c: In function 'piglit_init':
asmparsertest.c:243:10: warning: 'target' may be used uninitialized in this function [-Wmaybe-uninitialized]
   compile(argv[i], target, use_ARB);
          ^

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 tests/asmparsertest/asmparsertest.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/asmparsertest/asmparsertest.c b/tests/asmparsertest/asmparsertest.c
index 9b99e71..16ed0df 100644
--- a/tests/asmparsertest/asmparsertest.c
+++ b/tests/asmparsertest/asmparsertest.c
@@ -236,6 +236,7 @@ piglit_init(int argc, char **argv)
 		piglit_require_extension("GL_NV_fragment_program");
 		use_ARB = 0;
 	} else {
+		target = GL_NONE;
 		piglit_report_result(PIGLIT_FAIL);
 	}
 
-- 
1.8.4.2



More information about the Piglit mailing list