From d22eca5f90cc86105e2a42e39acc061353c21129 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 31 Mar 2016 10:54:18 +0200 Subject: [PATCH] tgsi: silence compiler warning in fetch_sampler_unit() The unit variable can be used uninitialized. Fixes: 24e77cb09 ("tgsi: handle indirect sampler arrays. (v2)") Signed-off-by: Samuel Pitoiset Reviewed-by: Brian Paul Reviewed-by: Dave Airlie --- src/gallium/auxiliary/tgsi/tgsi_exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c index 72d8c5a7247..a595bbbc6d3 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.c +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c @@ -1996,7 +1996,7 @@ fetch_sampler_unit(struct tgsi_exec_machine *mach, const struct tgsi_full_instruction *inst, uint sampler) { - uint unit; + uint unit = 0; int i; if (inst->Src[sampler].Register.Indirect) { const struct tgsi_full_src_register *reg = &inst->Src[sampler]; -- 2.30.2