mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-08-04 12:21:57 +03:00
build: use correct int conversion in NodeGetFreePages
Commit c8ba859bc7
introduced a compiler warning while un-wrapping
a python object to uint in libvirt_virNodeGetFreePages.
On compiling libvirt-python against libvirt 1.2.6, we get:
libvirt-override.c: In function ‘libvirt_virNodeGetFreePages’:
libvirt-override.c:7811:9: warning: pointer targets in passing argument 2 of ‘libvirt_intUnwrap’ differ in signedness [-Wpointer-sign]
if (libvirt_intUnwrap(tmp, &pages[i]) < 0)
^
In file included from libvirt-override.c:24:0:
typewrappers.h:169:5: note: expected ‘int *’ but argument is of type ‘unsigned int *’
int libvirt_intUnwrap(PyObject *obj, int *val);
^
Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
@ -7808,7 +7808,7 @@ libvirt_virNodeGetFreePages(PyObject *self ATTRIBUTE_UNUSED,
|
||||
for (i = 0; i < pyobj_pagesize_size; i++) {
|
||||
PyObject *tmp = PyList_GetItem(pyobj_pagesize, i);
|
||||
|
||||
if (libvirt_intUnwrap(tmp, &pages[i]) < 0)
|
||||
if (libvirt_uintUnwrap(tmp, &pages[i]) < 0)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user