[Piglit] [PATCH] fbo-scissor-blit: Silence uninitialized variable warning.
Vinson Lee
vlee at freedesktop.org
Fri Jan 10 18:12:08 PST 2014
Fix GCC maybe-uninitialized warning.
fbo-scissor-blit.c:109:5: warning: 'blit_to_fbo' may be used uninitialized in this function [-Wmaybe-uninitialized]
if (blit_to_fbo)
^
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
tests/fbo/fbo-scissor-blit.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/fbo/fbo-scissor-blit.c b/tests/fbo/fbo-scissor-blit.c
index 844e062..0a792eb 100644
--- a/tests/fbo/fbo-scissor-blit.c
+++ b/tests/fbo/fbo-scissor-blit.c
@@ -99,8 +99,10 @@ piglit_init(int argc, char **argv)
blit_to_fbo = false;
else if (strcmp(argv[1], "fbo") == 0)
blit_to_fbo = true;
- else
+ else {
+ blit_to_fbo = false;
print_usage_and_exit(argv[0]);
+ }
piglit_require_extension("GL_ARB_framebuffer_object");
--
1.8.4.2
More information about the Piglit
mailing list