From: Gert Wollny Date: Tue, 5 Jun 2018 11:58:48 +0000 (+0200) Subject: gallium/aux/tgsi_sanity.c: Fix -Wsign-compare warnings X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=09b3b37b95d492df959f3615641661fcfb6a93ec;p=mesa.git gallium/aux/tgsi_sanity.c: Fix -Wsign-compare warnings tgsi_sanity.c: In function 'iter_instruction': tgsi_sanity.c:316:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (ctx->index_of_END != ~0) { ^~ tgsi_sanity.c: In function 'epilog': tgsi_sanity.c:488:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (ctx->index_of_END == ~0) { Signed-off-by: Gert Wollny Reviewed-by: Emil Velikov --- diff --git a/src/gallium/auxiliary/tgsi/tgsi_sanity.c b/src/gallium/auxiliary/tgsi/tgsi_sanity.c index 2c9ad993331..47f426d813d 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_sanity.c +++ b/src/gallium/auxiliary/tgsi/tgsi_sanity.c @@ -313,7 +313,7 @@ iter_instruction( uint i; if (inst->Instruction.Opcode == TGSI_OPCODE_END) { - if (ctx->index_of_END != ~0) { + if (ctx->index_of_END != ~0u) { report_error( ctx, "Too many END instructions" ); } ctx->index_of_END = ctx->num_instructions; @@ -514,7 +514,7 @@ epilog( /* There must be an END instruction somewhere. */ - if (ctx->index_of_END == ~0) { + if (ctx->index_of_END == ~0u) { report_error( ctx, "Missing END instruction" ); }