A few functions are comparing signed and unsigned values, basically
because some of the loop indexes are signed values. Casting it to
unsigned seems harmless and makes GCC happier.
---
 python_modules/codegen.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python_modules/codegen.py b/python_modules/codegen.py
index 009cf95..603531f 100644
--- a/python_modules/codegen.py
+++ b/python_modules/codegen.py
@@ -266,7 +266,7 @@ class CodeWriter:
         return self.block()
 
     def for_loop(self, index, limit):
-        return self.block("for (%s = 0; %s < %s; %s++)" % (index, index, 
limit, index))
+        return self.block("for (%s = 0; %s < (unsigned) %s; %s++)" % (index, 
index, limit, index))
 
     def while_loop(self, expr):
         return self.block("while (%s)" % (expr))
-- 
1.9.3

_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to