[Piglit] [PATCH] ext_transform_feedback: Silence GCC -Wmaybe-uninitialized warning.

Vinson Lee vlee at freedesktop.org
Fri Nov 14 11:59:49 PST 2014


Fixes this GCC maybe-uninitialized warning.

intervening-read.c: In function 'piglit_init':
intervening-read.c:225:17: warning: 'gs' may be used uninitialized in this function [-Wmaybe-uninitialized]
   glAttachShader(prog, gs);
                 ^

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

diff --git a/tests/spec/ext_transform_feedback/intervening-read.c b/tests/spec/ext_transform_feedback/intervening-read.c
index 1396182..8c4896c 100644
--- a/tests/spec/ext_transform_feedback/intervening-read.c
+++ b/tests/spec/ext_transform_feedback/intervening-read.c
@@ -216,6 +216,7 @@ piglit_init(int argc, char **argv)
 		fs = piglit_compile_shader_text(GL_FRAGMENT_SHADER, fstext_gs);
 	} else {
 		vs = piglit_compile_shader_text(GL_VERTEX_SHADER, vstext_nogs);
+		gs = 0;
 		fs = piglit_compile_shader_text(GL_FRAGMENT_SHADER,
 						fstext_nogs);
 	}
-- 
1.9.3



More information about the Piglit mailing list