nir: stop gcc warning about uninitialised variables
authorTimothy Arceri <timothy.arceri@collabora.com>
Thu, 29 Dec 2016 02:18:59 +0000 (13:18 +1100)
committerTimothy Arceri <timothy.arceri@collabora.com>
Thu, 29 Dec 2016 02:47:11 +0000 (13:47 +1100)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_opt_if.c

index a804ee972c1eec08d846ff9759849c8c0578b153..ec66175027abb98046e0aa7a9af1089cc6cfa784 100644 (file)
@@ -120,7 +120,7 @@ opt_peel_loop_initial_if(nir_loop *loop)
    /* We already know we have exactly one continue */
    assert(exec_list_length(&cond_phi->srcs) == 2);
 
-   uint32_t entry_val, continue_val;
+   uint32_t entry_val = 0, continue_val = 0;
    nir_foreach_phi_src(src, cond_phi) {
       assert(src->src.is_ssa);
       nir_const_value *const_src = nir_src_as_const_value(src->src);