tex-miplevel-selection.c: In function 'piglit_init':
tex-miplevel-selection.c:919:58: warning: 'num_layers' may be used 
uninitialized in this function [-Wmaybe-uninitialized]
        (gltarget != GL_TEXTURE_3D && layer == TEST_LAYER % num_layers)) {
                                                          ^
tex-miplevel-selection.c:486:8: warning: 'type_str' may be used uninitialized 
in this function [-Wmaybe-uninitialized]
   if (!strcmp(type_str, "float"))
        ^
tex-miplevel-selection.c:764:4: warning: 'target_str' may be used uninitialized 
in this function [-Wmaybe-uninitialized]
    sprintf(fscode, GL3_FS_CODE, version, target_str,
    ^

Signed-off-by: Vinson Lee <[email protected]>
---
 tests/texturing/tex-miplevel-selection.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/texturing/tex-miplevel-selection.c 
b/tests/texturing/tex-miplevel-selection.c
index 3c14735..54592f9 100644
--- a/tests/texturing/tex-miplevel-selection.c
+++ b/tests/texturing/tex-miplevel-selection.c
@@ -207,7 +207,7 @@ piglit_init(int argc, char **argv)
        GLuint tex, fb, prog;
        GLenum status;
        int i, level, layer, dim, num_layers;
-       const char *target_str, *type_str, *compare_value_mask = "";
+       const char *target_str = "", *type_str = "", *compare_value_mask = "";
        const char *offset_type_str = "", *declaration = "", *instruction;
        const char *version = "130", *other_params = "", *deriv_type = "";
        GLenum format, attachment, clearbits;
@@ -859,6 +859,7 @@ piglit_init(int argc, char **argv)
                break;
        default:
                assert(0);
+               num_layers = 0;
        }
        if (!piglit_check_gl_error(GL_NO_ERROR))
                piglit_report_result(PIGLIT_FAIL);
-- 
2.2.0

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to