[Mesa-dev] [PATCH] nir: avoid uninitialized variable warning
Timothy Arceri
tarceri at itsqueeze.com
Sun Jan 6 23:34:55 UTC 2019
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109231
---
src/compiler/nir/nir_loop_analyze.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/compiler/nir/nir_loop_analyze.c b/src/compiler/nir/nir_loop_analyze.c
index 259f02a854..6deb6cb962 100644
--- a/src/compiler/nir/nir_loop_analyze.c
+++ b/src/compiler/nir/nir_loop_analyze.c
@@ -252,7 +252,7 @@ compute_induction_information(loop_info_state *state)
nir_phi_instr *src_phi =
nir_instr_as_phi(src_var->def->parent_instr);
- nir_op alu_op;
+ nir_op alu_op = nir_num_opcodes; /* avoid uninitialized warning */
nir_ssa_def *alu_srcs[2] = {0};
nir_foreach_phi_src(src2, src_phi) {
nir_loop_variable *src_var2 =
--
2.20.1
More information about the mesa-dev
mailing list