diff options
author | Gert Wollny <[email protected]> | 2018-06-05 13:58:49 +0200 |
---|---|---|
committer | Gert Wollny <[email protected]> | 2018-06-20 11:08:28 +0200 |
commit | b8fca73e472b05448f4b826785fecd126d4ab904 (patch) | |
tree | ce351a921805a99c770abeb6c4bfa9ae2dc5614e /src/gallium/auxiliary/tgsi | |
parent | 09b3b37b95d492df959f3615641661fcfb6a93ec (diff) |
gallium/aux/tgsi_aa_point.c: Fix -Wsign-compare warnings
tgsi/tgsi_aa_point.c:32:0:
tgsi/tgsi_aa_point.c: In Funktion »aa_decl«:
./util/u_math.h:660:29: Comparison between signed and unsigned in
conditional expressions [-Wsign-compare]
#define MAX2( A, B ) ( (A)>(B) ? (A) : (B) )
^
tgsi/tgsi_aa_point.c:76:21: Remark: when substituting of the macro
»MAX2«
ts->num_tmp = MAX2(ts->num_tmp, decl->Range.Last + 1);
^~~~
./util/u_math.h:660:40: Warning: signed and unsigned type in conditional
expression [-Wsign-compare]
#define MAX2( A, B ) ( (A)>(B) ? (A) : (B) )
^
tgsi/tgsi_aa_point.c:76:21: Remark: when substituting of the macro
»MAX2«
ts->num_tmp = MAX2(ts->num_tmp, decl->Range.Last + 1);
^~~~
tgsi/tgsi_aa_point.c: In Funktion »aa_inst«:
tgsi/tgsi_aa_point.c:220:31: Comparison between signed and unsigned in
conditional expressions [-Wsign-compare]
dst->Register.Index == ts->color_out) {
Signed-off-by: Gert Wollny <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/tgsi')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_aa_point.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_aa_point.c b/src/gallium/auxiliary/tgsi/tgsi_aa_point.c index 4b14a2fc98f..cdd4fef2511 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_aa_point.c +++ b/src/gallium/auxiliary/tgsi/tgsi_aa_point.c @@ -73,7 +73,7 @@ aa_decl(struct tgsi_transform_context *ctx, ts->num_input++; } else if (decl->Declaration.File == TGSI_FILE_TEMPORARY) { - ts->num_tmp = MAX2(ts->num_tmp, decl->Range.Last + 1); + ts->num_tmp = MAX2(ts->num_tmp, (unsigned)(decl->Range.Last + 1)); } ctx->emit_declaration(ctx, decl); @@ -217,7 +217,7 @@ aa_inst(struct tgsi_transform_context *ctx, for (i = 0; i < inst->Instruction.NumDstRegs; i++) { struct tgsi_full_dst_register *dst = &inst->Dst[i]; if (dst->Register.File == TGSI_FILE_OUTPUT && - dst->Register.Index == ts->color_out) { + dst->Register.Index == (int)ts->color_out) { dst->Register.File = TGSI_FILE_TEMPORARY; dst->Register.Index = ts->color_tmp; } |