gallium/aux/util/u_pstipple.c: Fix one -Wsign-compare warning in ?: construct.
authorGert Wollny <gw.fossdev@gmail.com>
Thu, 16 Nov 2017 15:09:46 +0000 (16:09 +0100)
committerBrian Paul <brianp@vmware.com>
Fri, 17 Nov 2017 16:27:57 +0000 (09:27 -0700)
Silence the warning by making the conversion to int explicit.

Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/util/u_pstipple.c

index ae4cfa1..77b0458 100644 (file)
@@ -297,7 +297,7 @@ pstip_transform_prolog(struct tgsi_transform_context *ctx)
       ctx->emit_declaration(ctx, &decl);
    }
 
-   sampIdx = pctx->hasFixedUnit ? pctx->fixedUnit : pctx->freeSampler;
+   sampIdx = pctx->hasFixedUnit ? (int)pctx->fixedUnit : pctx->freeSampler;
 
    /* declare new sampler */
    tgsi_transform_sampler_decl(ctx, sampIdx);