llvmpipe: Silence uninitialized variable warning about "chan"
authorEric Anholt <eric@anholt.net>
Tue, 17 Dec 2019 04:52:22 +0000 (20:52 -0800)
committerEric Anholt <eric@anholt.net>
Tue, 18 Feb 2020 23:40:04 +0000 (15:40 -0800)
Both arms of an if define it, but gcc doesn't notice.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3867>

src/gallium/auxiliary/gallivm/lp_bld_format_soa.c

index c5962a6..673ba2a 100644 (file)
@@ -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: