From: Samuel Pitoiset Date: Thu, 31 Mar 2016 08:54:18 +0000 (+0200) Subject: tgsi: silence compiler warning in fetch_sampler_unit() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d22eca5f90cc86105e2a42e39acc061353c21129;p=mesa.git 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 --- 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];