nir: initialise some variables in opt_if_loop_last_continue()
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 10 Apr 2019 23:38:02 +0000 (09:38 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Thu, 11 Apr 2019 10:38:03 +0000 (20:38 +1000)
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@intel.com>
src/compiler/nir/nir_opt_if.c

index 713bdf0..d0aaf9f 100644 (file)
@@ -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.