Re: [Spice-devel] [PATCH 2/2] python: Fix -Wsign-compare

2014-09-03 Thread Marc-André Lureau
Hi - Original Message - > The most part of the values are already unsigned values. The exceptions, > that are causing the warnings, are: > > generated_server_marshallers.c:1387:27: warning: comparison between > signed and unsigned integer expressions [-Wsign-compare] > for (j

Re: [Spice-devel] [PATCH 2/2] python: Fix -Wsign-compare

2014-09-03 Thread Fabiano Fidêncio
On Wed, 2014-09-03 at 06:01 -0400, Marc-André Lureau wrote: > Can limit be negative? I don't think so: http://paste.stg.fedoraproject.org/4623/39072140/ > Can limit be made unsigned instead? Actually, what I'm doing is making the limit unsigned, thanks for catching the error in the commit log :-

Re: [Spice-devel] [PATCH 2/2] python: Fix -Wsign-compare

2014-09-03 Thread Fabiano Fidêncio
On Wed, 2014-09-03 at 06:22 -0400, Marc-André Lureau wrote: > > - Original Message - > > On Wed, 2014-09-03 at 06:01 -0400, Marc-André Lureau wrote: > > > Can limit be negative? > > > > I don't think so: http://paste.stg.fedoraproject.org/4623/39072140/ > > > > > Can limit be made unsign

Re: [Spice-devel] [PATCH 2/2] python: Fix -Wsign-compare

2014-09-03 Thread Marc-André Lureau
- Original Message - > On Wed, 2014-09-03 at 06:01 -0400, Marc-André Lureau wrote: > > Can limit be negative? > > I don't think so: http://paste.stg.fedoraproject.org/4623/39072140/ > > > Can limit be made unsigned instead? > > Actually, what I'm doing is making the limit unsigned, tha

Re: [Spice-devel] [PATCH 2/2] python: Fix -Wsign-compare

2014-09-03 Thread Marc-André Lureau
Can limit be negative? Can limit be made unsigned instead? - Original Message - > 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

[Spice-devel] [PATCH 2/2] python: Fix -Wsign-compare

2014-09-03 Thread Fabiano Fidêncio
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/code