[Mesa-dev] [PATCH] gallivm: Fix GCC unused-variable warning.
Brian Paul
brianp at vmware.com
Thu Jul 30 06:32:22 PDT 2015
On 07/29/2015 09:19 PM, Vinson Lee wrote:
> lp_bld_tgsi_soa.c: In function 'lp_emit_immediate_soa':
> lp_bld_tgsi_soa.c:3065:18: warning: unused variable 'size' [-Wunused-variable]
> const uint size = imm->Immediate.NrTokens - 1;
> ^
>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
> src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c | 3 +--
> 1 file changed, 1 insertion(+), 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 55f606f..fae604e 100644
> --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
> +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
> @@ -3062,8 +3062,7 @@ void lp_emit_immediate_soa(
> } else {
> /* simply copy the immediate values into the next immediates[] slot */
> unsigned i;
> - const uint size = imm->Immediate.NrTokens - 1;
> - assert(size <= 4);
> + assert(imm->Immediate.NrTokens - 1 <= 4);
> assert(bld->num_immediates < LP_MAX_INLINED_IMMEDIATES);
>
> for(i = 0; i < 4; ++i )
>
Reviewed-by: Brian Paul <brianp at vmware.com>
More information about the mesa-dev
mailing list