[Piglit] [PATCH] fbo-rg: Silence uninitialized variable warning.

Vinson Lee vlee at freedesktop.org
Fri Jan 10 18:04:23 PST 2014


Fix GCC maybe-uninitialized warning.

fbo-rg.c:485:34: warning: 'internal_format' may be used uninitialized in this function [-Wmaybe-uninitialized]
  pass = render_and_check_textures(internal_format);
                                  ^

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

diff --git a/tests/fbo/fbo-rg.c b/tests/fbo/fbo-rg.c
index fd20064..ca5042a 100644
--- a/tests/fbo/fbo-rg.c
+++ b/tests/fbo/fbo-rg.c
@@ -409,7 +409,7 @@ usage(const char *name)
 void
 piglit_init(int argc, char **argv)
 {
-	GLenum internal_format;
+	GLenum internal_format = GL_NONE;
 	const char *fmt;
 
 	if ((argc == 1) || (strncmp(argv[1], "GL_R", 4) != 0))
-- 
1.8.4.2



More information about the Piglit mailing list