[libvirt] [PATCH python] Fix comparisons between signed & unsigned integers

Martin Kletzander mkletzan at redhat.com
Tue Sep 26 11:36:13 UTC 2017


On Tue, Sep 26, 2017 at 11:16:05AM +0100, Daniel P. Berrange wrote:
>When python3 builds C modules, it adds the -Wsign-compare flag to GCC.
>This creates lots of warnings where we compare a 'size_t' value against
>an 'int' value due to signed/unsigned difference.  Change all the size_t
>types to ssize_t to address this.
>
>Signed-off-by: Daniel P. Berrange <berrange at redhat.com>

Hm, I wanted this to be the case when we started to force using size_t for i,j,k
variables, but looks like I was the only one who wanted ssize_t (plus we would
be able to do that only in some places, so automatic enforcement without
-Wsign-compare would not be easily possible)

ACK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170926/d6ae19e0/attachment-0001.sig>


More information about the libvir-list mailing list