[virglrenderer-devel] [PATCH v2 02/15] gallium/aux/tgsi/tgsi_dump.c: Fix -Wsign-compare warnings

Gert Wollny gert.wollny at collabora.com
Tue Jun 5 20:19:50 UTC 2018


tgsi_dump.c: In function 'iter_property':
tgsi_dump.c:443:18: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
    for (i = 0; i < prop->Property.NrTokens - 1; ++i) {
                  ^
tgsi_dump.c:459:13: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
       if (i < prop->Property.NrTokens - 2)

Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
---
 src/gallium/auxiliary/tgsi/tgsi_dump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.c b/src/gallium/auxiliary/tgsi/tgsi_dump.c
index eeb9e67..d2adef2 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_dump.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_dump.c
@@ -431,7 +431,7 @@ iter_property(
    struct tgsi_iterate_context *iter,
    struct tgsi_full_property *prop )
 {
-   unsigned i;
+   int i;
    struct dump_ctx *ctx = (struct dump_ctx *)iter;
 
    TXT( "PROPERTY " );
-- 
2.16.4



More information about the virglrenderer-devel mailing list