From 15605cc9d481dccc8f4dff0e6471600809d56980 Mon Sep 17 00:00:00 2001 From: "Kristian H. Kristensen" Date: Wed, 10 Apr 2019 13:10:48 -0700 Subject: glsl_to_nir: Initialize debug variable If we want to assert on found == true when the loop exits early, we need to initialize it to false. Signed-off-by: Kristian H. Kristensen Reviewed-by: Ian Romanick --- src/compiler/glsl/glsl_to_nir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/compiler') diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index 547764982dc..0aeac769452 100644 --- a/src/compiler/glsl/glsl_to_nir.cpp +++ b/src/compiler/glsl/glsl_to_nir.cpp @@ -523,7 +523,7 @@ nir_visitor::visit(ir_variable *ir) var->type = wrap_type_in_array(explicit_ifc_type, ir->type); } else { /* Otherwise, this variable is one entry in the interface */ - UNUSED bool found; + UNUSED bool found = false; for (unsigned i = 0; i < explicit_ifc_type->length; i++) { const glsl_struct_field *field = &explicit_ifc_type->fields.structure[i]; -- cgit v1.2.3