[Mesa-dev] [PATCH 13/23] gallium/aux/util/u_pstipple.c: Fix one -Wsign-compare warning in ?: construct.

Gert Wollny gw.fossdev at gmail.com
Sun Nov 12 13:55:45 UTC 2017


Silence the warning by making the conversion to int explicit.
---
 src/gallium/auxiliary/util/u_pstipple.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/util/u_pstipple.c b/src/gallium/auxiliary/util/u_pstipple.c
index ae4cfa1d76..77b0458dc0 100644
--- a/src/gallium/auxiliary/util/u_pstipple.c
+++ b/src/gallium/auxiliary/util/u_pstipple.c
@@ -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);
-- 
2.13.6



More information about the mesa-dev mailing list