[virglrenderer-devel] [PATCH 03/16] gallium/aux/tgsi/tgsi_build.c: Fix warnings
Gert Wollny
gert.wollny at collabora.com
Thu May 31 09:15:35 UTC 2018
/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++ ) {
Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
---
src/gallium/auxiliary/tgsi/tgsi_build.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.c b/src/gallium/auxiliary/tgsi/tgsi_build.c
index a57f2e3..9e9d806 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_build.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_build.c
@@ -584,7 +584,8 @@ tgsi_build_full_immediate(
struct tgsi_header *header,
unsigned maxsize )
{
- unsigned size = 0, i;
+ unsigned size = 0;
+ int i;
struct tgsi_immediate *immediate;
if( maxsize <= size )
@@ -691,6 +692,7 @@ tgsi_build_instruction_label(
struct tgsi_header *header )
{
struct tgsi_instruction_label instruction_label;
+ VREND_UNUSED(prev_token);
instruction_label.Label = label;
instruction_label.Padding = 0;
@@ -722,6 +724,7 @@ tgsi_build_instruction_texture(
struct tgsi_header *header )
{
struct tgsi_instruction_texture instruction_texture;
+ VREND_UNUSED(prev_token);
instruction_texture.Texture = texture;
instruction_texture.NumOffsets = num_offsets;
@@ -757,6 +760,7 @@ tgsi_build_texture_offset(
struct tgsi_header *header )
{
struct tgsi_texture_offset texture_offset;
+ VREND_UNUSED(prev_token);
texture_offset.Index = index;
texture_offset.File = file;
@@ -1290,7 +1294,8 @@ tgsi_build_full_property(
struct tgsi_header *header,
unsigned maxsize )
{
- unsigned size = 0, i;
+ unsigned size = 0;
+ int i;
struct tgsi_property *property;
if( maxsize <= size )
--
2.16.1
More information about the virglrenderer-devel
mailing list