From: Marek Olšák <marek.ol...@amd.com>

For some reason, the last element is uninitialized if I don't clear
the structure like this.
---
 tests/spec/gl-1.0/rendermode-feedback.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tests/spec/gl-1.0/rendermode-feedback.c 
b/tests/spec/gl-1.0/rendermode-feedback.c
index 2260370a3..3a46ab4b7 100644
--- a/tests/spec/gl-1.0/rendermode-feedback.c
+++ b/tests/spec/gl-1.0/rendermode-feedback.c
@@ -94,28 +94,27 @@ struct type {
          ARRAY_SIZE(gl_4d_color_texture_values) },
 };
 
 static enum piglit_result run_subtest(void * data);
 static const struct piglit_gl_test_config * piglit_config;
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
        piglit_config = &config;
 
-       struct piglit_subtest tests[ARRAY_SIZE(types) + 1];
+       struct piglit_subtest tests[ARRAY_SIZE(types) + 1] = {};
        for (unsigned i = 0; i < ARRAY_SIZE(types); ++i) {
                tests[i].name = piglit_get_gl_enum_name(types[i].type);
                tests[i].option = tests[i].name;
                tests[i].subtest_func = run_subtest;
                tests[i].data = (void *)&types[i];
        }
-       tests[ARRAY_SIZE(types)] = (struct piglit_subtest){ 0 };
        config.subtests = tests;
 
        config.supports_gl_compat_version = 10;
 
        config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
        config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 static void
-- 
2.17.1

_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to