[Piglit] [PATCH] arb_texture_view-formats: Silence uninitialized variable warning.
Vinson Lee
vlee at freedesktop.org
Fri Jan 24 23:05:50 PST 2014
This patch fixes this GCC maybe-uninitialized warning.
formats.c: In function 'test_format_errors':
formats.c:269:27: warning: 'numFormats' may be used uninitialized in this function [-Wmaybe-uninitialized]
pass = check_format_array(GL_NO_ERROR, numFormats, legalFormats,
^
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
tests/spec/arb_texture_view/formats.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/spec/arb_texture_view/formats.c b/tests/spec/arb_texture_view/formats.c
index d971c3b..78d0869 100644
--- a/tests/spec/arb_texture_view/formats.c
+++ b/tests/spec/arb_texture_view/formats.c
@@ -256,6 +256,7 @@ test_format_errors(GLenum format_class)
break;
default:
assert(!"Invalid format_class\n");
+ numFormats = 0;
}
if (!piglit_check_gl_error(GL_NO_ERROR)) {
--
1.8.5.3
More information about the Piglit
mailing list