gallium/aux/tgsi/tgsi_build.c: Fix warnings

/tgsi_build.c: In function 'tgsi_build_full_immediate':
tgsi_build.c:599:18: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
    for( i = 0; i < full_imm->Immediate.NrTokens - 1; i++ ) {
                  ^
tgsi_build.c: In function 'tgsi_build_instruction_label':
tgsi_build.c:689:24: warning: unused parameter 'prev_token' [-Wunused-
parameter]
    struct tgsi_token  *prev_token,
                        ^~~~~~~~~~
tgsi_build.c: In function 'tgsi_build_instruction_texture':
tgsi_build.c:720:23: warning: unused parameter 'prev_token' [-Wunused-
parameter]
    struct tgsi_token *prev_token,
                       ^~~~~~~~~~
tgsi_build.c: In function 'tgsi_build_texture_offset':
tgsi_build.c:755:23: warning: unused parameter 'prev_token' [-Wunused-
parameter]
    struct tgsi_token *prev_token,
                       ^~~~~~~~~~
tgsi_build.c: In function 'tgsi_build_full_property':
tgsi_build.c:1307:18: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
    for( i = 0; i < full_prop->Property.NrTokens - 1; i++ ) {

v2: remove the unused prev_token (in sync with mesa)

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
macos/master
Gert Wollny 7 years ago committed by Jakob Bornecrantz
parent f0f9466623
commit 16a06ce340
  1. 22
      src/gallium/auxiliary/tgsi/tgsi_build.c

@ -596,7 +596,8 @@ tgsi_build_full_immediate(
struct tgsi_header *header, struct tgsi_header *header,
unsigned maxsize ) unsigned maxsize )
{ {
unsigned size = 0, i; unsigned size = 0;
int i;
struct tgsi_immediate *immediate; struct tgsi_immediate *immediate;
if( maxsize <= size ) if( maxsize <= size )
@ -700,7 +701,6 @@ tgsi_default_instruction_label( void )
static struct tgsi_instruction_label static struct tgsi_instruction_label
tgsi_build_instruction_label( tgsi_build_instruction_label(
unsigned label, unsigned label,
struct tgsi_token *prev_token,
struct tgsi_instruction *instruction, struct tgsi_instruction *instruction,
struct tgsi_header *header ) struct tgsi_header *header )
{ {
@ -731,7 +731,6 @@ static struct tgsi_instruction_texture
tgsi_build_instruction_texture( tgsi_build_instruction_texture(
unsigned texture, unsigned texture,
unsigned num_offsets, unsigned num_offsets,
struct tgsi_token *prev_token,
struct tgsi_instruction *instruction, struct tgsi_instruction *instruction,
struct tgsi_header *header ) struct tgsi_header *header )
{ {
@ -765,7 +764,6 @@ tgsi_build_instruction_memory(
unsigned qualifier, unsigned qualifier,
unsigned texture, unsigned texture,
unsigned format, unsigned format,
struct tgsi_token *prev_token,
struct tgsi_instruction *instruction, struct tgsi_instruction *instruction,
struct tgsi_header *header ) struct tgsi_header *header )
{ {
@ -800,7 +798,6 @@ tgsi_default_texture_offset( void )
static struct tgsi_texture_offset static struct tgsi_texture_offset
tgsi_build_texture_offset( tgsi_build_texture_offset(
int index, int file, int swizzle_x, int swizzle_y, int swizzle_z, int index, int file, int swizzle_x, int swizzle_y, int swizzle_z,
struct tgsi_token *prev_token,
struct tgsi_instruction *instruction, struct tgsi_instruction *instruction,
struct tgsi_header *header ) struct tgsi_header *header )
{ {
@ -1050,7 +1047,6 @@ tgsi_build_full_instruction(
unsigned size = 0; unsigned size = 0;
unsigned i; unsigned i;
struct tgsi_instruction *instruction; struct tgsi_instruction *instruction;
struct tgsi_token *prev_token;
if( maxsize <= size ) if( maxsize <= size )
return 0; return 0;
@ -1063,7 +1059,6 @@ tgsi_build_full_instruction(
full_inst->Instruction.NumDstRegs, full_inst->Instruction.NumDstRegs,
full_inst->Instruction.NumSrcRegs, full_inst->Instruction.NumSrcRegs,
header); header);
prev_token = (struct tgsi_token *) instruction;
if (full_inst->Instruction.Label) { if (full_inst->Instruction.Label) {
struct tgsi_instruction_label *instruction_label; struct tgsi_instruction_label *instruction_label;
@ -1076,10 +1071,8 @@ tgsi_build_full_instruction(
*instruction_label = tgsi_build_instruction_label( *instruction_label = tgsi_build_instruction_label(
full_inst->Label.Label, full_inst->Label.Label,
prev_token,
instruction, instruction,
header ); header );
prev_token = (struct tgsi_token *) instruction_label;
} }
if (full_inst->Instruction.Texture) { if (full_inst->Instruction.Texture) {
@ -1093,11 +1086,9 @@ tgsi_build_full_instruction(
*instruction_texture = tgsi_build_instruction_texture( *instruction_texture = tgsi_build_instruction_texture(
full_inst->Texture.Texture, full_inst->Texture.Texture,
full_inst->Texture.NumOffsets, full_inst->Texture.NumOffsets,
prev_token,
instruction, instruction,
header ); header );
prev_token = (struct tgsi_token *) instruction_texture;
for (i = 0; i < full_inst->Texture.NumOffsets; i++) { for (i = 0; i < full_inst->Texture.NumOffsets; i++) {
struct tgsi_texture_offset *texture_offset; struct tgsi_texture_offset *texture_offset;
@ -1112,10 +1103,8 @@ tgsi_build_full_instruction(
full_inst->TexOffsets[i].SwizzleX, full_inst->TexOffsets[i].SwizzleX,
full_inst->TexOffsets[i].SwizzleY, full_inst->TexOffsets[i].SwizzleY,
full_inst->TexOffsets[i].SwizzleZ, full_inst->TexOffsets[i].SwizzleZ,
prev_token,
instruction, instruction,
header); header);
prev_token = (struct tgsi_token *) texture_offset;
} }
} }
@ -1132,10 +1121,8 @@ tgsi_build_full_instruction(
full_inst->Memory.Qualifier, full_inst->Memory.Qualifier,
full_inst->Memory.Texture, full_inst->Memory.Texture,
full_inst->Memory.Format, full_inst->Memory.Format,
prev_token,
instruction, instruction,
header ); header );
prev_token = (struct tgsi_token *) instruction_memory;
} }
for( i = 0; i < full_inst->Instruction.NumDstRegs; i++ ) { for( i = 0; i < full_inst->Instruction.NumDstRegs; i++ ) {
@ -1360,7 +1347,8 @@ tgsi_build_full_property(
struct tgsi_header *header, struct tgsi_header *header,
unsigned maxsize ) unsigned maxsize )
{ {
unsigned size = 0, i; unsigned size = 0;
int i;
struct tgsi_property *property; struct tgsi_property *property;
if( maxsize <= size ) if( maxsize <= size )

Loading…
Cancel
Save