mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-12-06 00:23:47 +03:00
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>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user