diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2017-09-26 11:12:18 +0100 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2017-09-26 11:12:18 +0100 |
commit | 75ec2acb6163b4f71921e6efbaca088fa8ed16a9 (patch) | |
tree | 644f192bab3fc80a0fad3bd5a0337f13dca6fbff /typewrappers.c | |
parent | f70939fc3e2882aa55ad358617d4eaad7b5f5291 (diff) | |
download | libvirt-python-75ec2acb6163b4f71921e6efbaca088fa8ed16a9.tar.gz |
Fix comparisons between signed & unsigned integers
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@redhat.com>
Diffstat (limited to 'typewrappers.c')
-rw-r--r-- | typewrappers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/typewrappers.c b/typewrappers.c index a9561dd..01ee310 100644 --- a/typewrappers.c +++ b/typewrappers.c @@ -319,7 +319,7 @@ libvirt_ulonglongUnwrap(PyObject *obj, PyErr_SetString(PyExc_TypeError, "an integer is required"); } - if ((ullong_val == -1) && PyErr_Occurred()) + if ((ullong_val == (unsigned long long)-1) && PyErr_Occurred()) return -1; *val = ullong_val; |