llvmpipe: Silence uninitialized variable warning about "vals"
authorEric Anholt <eric@anholt.net>
Tue, 17 Dec 2019 04:55:23 +0000 (20:55 -0800)
committerEric Anholt <eric@anholt.net>
Tue, 18 Feb 2020 23:40:04 +0000 (15:40 -0800)
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3867>

src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c

index 05f16d81e56e554b0b15472ed5976dbcbeeb589e..67b7b69e8f46f93bcf81eb385ff3a9e9c1ce888e 100644 (file)
@@ -425,7 +425,7 @@ static LLVMValueRef emit_load_reg(struct lp_build_nir_context *bld_base,
    struct gallivm_state *gallivm = bld_base->base.gallivm;
    LLVMBuilderRef builder = gallivm->builder;
    int nc = reg->reg->num_components;
-   LLVMValueRef vals[NIR_MAX_VEC_COMPONENTS];
+   LLVMValueRef vals[NIR_MAX_VEC_COMPONENTS] = { NULL };
    struct lp_build_context *uint_bld = &bld_base->uint_bld;
    if (reg->reg->num_array_elems) {
       LLVMValueRef indirect_val = lp_build_const_int_vec(gallivm, uint_bld->type, reg->base_offset);