From ce611935df5e7e6cc731523c7496c33ba6f7ef20 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 16 Dec 2019 20:05:18 -0800 Subject: [PATCH] llvmpipe: Silence "possibly uninitialized value" warning for ssbo_limit. The condition for the use matches the def, but you can't trust a compiler to notice. Reviewed-by: Roland Scheidegger Part-of: --- src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c index 38e92cb67d3..8dad6082390 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c @@ -3483,7 +3483,7 @@ load_emit( scalar_ptr = is_shared ? bld->shared_ptr : bld->ssbos[buf]; - LLVMValueRef ssbo_limit; + LLVMValueRef ssbo_limit = NULL; if (!is_shared) { ssbo_limit = LLVMBuildAShr(gallivm->builder, bld->ssbo_sizes[buf], lp_build_const_int32(gallivm, 2), ""); @@ -3602,7 +3602,7 @@ store_emit( scalar_ptr = is_shared ? bld->shared_ptr : bld->ssbos[buf]; - LLVMValueRef ssbo_limit; + LLVMValueRef ssbo_limit = NULL; if (!is_shared) { ssbo_limit = LLVMBuildAShr(gallivm->builder, bld->ssbo_sizes[buf], lp_build_const_int32(gallivm, 2), "");