From: Eric Anholt Date: Tue, 17 Dec 2019 04:52:22 +0000 (-0800) Subject: llvmpipe: Silence uninitialized variable warning about "chan" X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b32bd704c0a22b6eb691f93158acbbdd4c5d370a;p=mesa.git llvmpipe: Silence uninitialized variable warning about "chan" Both arms of an if define it, but gcc doesn't notice. Reviewed-by: Roland Scheidegger Part-of: --- diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c index c5962a66699..673ba2af001 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c @@ -874,7 +874,7 @@ lp_build_insert_soa_chan(struct lp_build_context *bld, const unsigned width = chan_desc.size; const unsigned start = chan_desc.shift; const unsigned stop = start + width; - LLVMValueRef chan; + LLVMValueRef chan = NULL; switch(chan_desc.type) { case UTIL_FORMAT_TYPE_UNSIGNED: