[Piglit] [PATCH] arb_texture_buffer_object-formats: Initialize variable.

Vinson Lee vlee at freedesktop.org
Thu Dec 18 21:22:39 PST 2014


Fix Clang Static Analyzer "Assigned value is garbage or undefined" bugs.

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

diff --git a/tests/spec/arb_texture_buffer_object/formats.c b/tests/spec/arb_texture_buffer_object/formats.c
index 81f494e..86f27f8 100644
--- a/tests/spec/arb_texture_buffer_object/formats.c
+++ b/tests/spec/arb_texture_buffer_object/formats.c
@@ -275,7 +275,7 @@ get_expected_f(const struct format *format, int sample, float *expected)
 static bool
 get_expected_i(const struct format *format, int sample, uint32_t *expected)
 {
-	uint32_t chans[4];
+	uint32_t chans[4] = { 0 };
 	int i;
 
 	for (i = 0; i < format->components; i++) {
-- 
2.1.0



More information about the Piglit mailing list