Mesa (master): nir: initialise some variables in opt_if_loop_last_continue()
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Apr 11 10:43:51 UTC 2019
Module: Mesa
Branch: master
Commit: 9e3740c47f2c3d98591ed55af8ebc186735da070
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9e3740c47f2c3d98591ed55af8ebc186735da070
Author: Timothy Arceri <tarceri at itsqueeze.com>
Date: Thu Apr 11 09:38:02 2019 +1000
nir: initialise some variables in opt_if_loop_last_continue()
Fixes a couple of Coverity warnings CID 1444626.
Fixes: e30804c6024f ("nir/radv: remove restrictions on opt_if_loop_last_continue()")
Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
---
src/compiler/nir/nir_opt_if.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/compiler/nir/nir_opt_if.c b/src/compiler/nir/nir_opt_if.c
index 713bdf0c38a..d0aaf9f7133 100644
--- a/src/compiler/nir/nir_opt_if.c
+++ b/src/compiler/nir/nir_opt_if.c
@@ -839,8 +839,8 @@ static bool
opt_if_loop_last_continue(nir_loop *loop, bool aggressive_last_continue)
{
nir_if *nif;
- bool then_ends_in_continue;
- bool else_ends_in_continue;
+ bool then_ends_in_continue = false;
+ bool else_ends_in_continue = false;
/* Scan the control flow of the loop from the last to the first node
* looking for an if-statement we can optimise.
More information about the mesa-commit
mailing list