[Mesa-dev] [PATCH] nir: stop gcc warning about uninitialised variables

Jason Ekstrand jason at jlekstrand.net
Thu Dec 29 02:29:50 UTC 2016


Sure.  Rb.

On Dec 28, 2016 8:19 PM, "Timothy Arceri" <timothy.arceri at collabora.com>
wrote:

> ---
>  src/compiler/nir/nir_opt_if.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/compiler/nir/nir_opt_if.c b/src/compiler/nir/nir_opt_if.c
> index a804ee9..ec66175 100644
> --- a/src/compiler/nir/nir_opt_if.c
> +++ b/src/compiler/nir/nir_opt_if.c
> @@ -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);
> --
> 2.9.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161228/23d4b7bf/attachment.html>


More information about the mesa-dev mailing list