[virglrenderer-devel] [PATCH v2 10/15] gallium/aux/tgsi_text.c: Fix some warnings
Gert Wollny
gert.wollny at collabora.com
Tue Jun 5 20:19:58 UTC 2018
tgsi/tgsi_text.c: In function 'parse_identifier':
tgsi/tgsi_text.c:190:16: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
if (i == len - 1)
^~
tgsi/tgsi_text.c: In function 'parse_optional_swizzle':
../../../../src/gallium/auxiliary/tgsi/tgsi_text.c:816:21: warning:
comparison between signed and unsigned integer expressions [-Wsign-
compare]
for (i = 0; i < components; i++) {
^
tgsi/tgsi_text.c: In function 'parse_instruction':
tgsi/tgsi_text.c:1025:18: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
for (i = 0; i < info->num_dst + info->num_src + info->is_tex; i++) {
^
tgsi/tgsi_text.c:1040:18: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
else if (i < info->num_dst + info->num_src) {
^
tgsi/tgsi_text.c: In function 'parse_immediate':
tgsi/tgsi_text.c:1525:24: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
for (type = 0; type < Elements(tgsi_immediate_type_names); ++type) {
tgsi/tgsi_text.c: In Funktion »parse_instruction«:
tgsi/tgsi_text.c:1025:18: Warnung: Vergleich zwischen
vorzeichenbehafteten und vorzeichenlosen Ganzzahlausdrücken [-Wsign-
compare]
for (i = 0; i < info->num_dst + info->num_src + info->is_tex; i++) {
^
auxiliary/tgsi/tgsi_text.c:1040:18: Warnung: Vergleich zwischen
vorzeichenbehafteten und vorzeichenlosen Ganzzahlausdrücken [-Wsign-
compare]
else if (i < info->num_dst + info->num_src) {
Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
---
src/gallium/auxiliary/tgsi/tgsi_text.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c
index c1b1916..038bf48 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_text.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_text.c
@@ -187,7 +187,7 @@ static boolean parse_identifier( const char **pcur, char *ret, size_t len )
if (is_alpha_underscore( cur )) {
ret[i++] = *cur++;
while (is_alpha_underscore( cur ) || is_digit( cur )) {
- if (i == len - 1)
+ if (i == (int)len - 1)
return FALSE;
ret[i++] = *cur++;
}
@@ -809,7 +809,7 @@ parse_optional_swizzle(
eat_opt_white( &cur );
if (*cur == '.') {
- uint i;
+ int i;
cur++;
eat_opt_white( &cur );
@@ -970,7 +970,7 @@ parse_instruction(
struct translate_ctx *ctx,
boolean has_label )
{
- uint i;
+ int i;
uint saturate = 0;
const struct tgsi_opcode_info *info;
struct tgsi_full_instruction inst;
@@ -1491,7 +1491,7 @@ static boolean parse_immediate( struct translate_ctx *ctx )
{
struct tgsi_full_immediate imm;
uint advance;
- int type;
+ uint type;
if (*ctx->cur == '[') {
uint uindex;
--
2.16.4
More information about the virglrenderer-devel
mailing list