gallium/aux/tgsi_two_side.c: Fix -Wsign-compare warnings
Integer propagation rules can sometimes be irritating. With
"unsigned x" "x + 1" gets propagated to a signed integer, so explicitely
assign the sum to an unsigned and use that for comaprison.
In file included from tgsi/tgsi_two_side.c:41:0:
tgsi/tgsi_two_side.c: In function 'xform_decl':
./util/u_math.h:660:29: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
#define MAX2( A, B ) ( (A)>(B) ? (A) : (B) )
^
tgsi/tgsi_two_side.c:86:24: note: in expansion of macro 'MAX2'
ts->num_inputs = MAX2(ts->num_inputs, 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_two_side.c:86:24: note: in expansion of macro 'MAX2'
ts->num_inputs = MAX2(ts->num_inputs, decl->Range.Last + 1);
^~~~
./util/u_math.h:660:29: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
#define MAX2( A, B ) ( (A)>(B) ? (A) : (B) )
^
tgsi/tgsi_two_side.c:89:23: note: in expansion of macro 'MAX2'
ts->num_temps = MAX2(ts->num_temps, 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_two_side.c:89:23: note: in expansion of macro 'MAX2'
ts->num_temps = MAX2(ts->num_temps, decl->Range.Last + 1);
^~~~
tgsi/tgsi_two_side.c: In function 'xform_inst':
tgsi/tgsi_two_side.c:184:45: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
if (inst->Src[i].Register.Index == ts-
>front_color_input[j]) {
^~
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>