diff options
author | Nehal J Wani <nehaljw.kkd1@gmail.com> | 2014-06-25 21:48:05 +0530 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2014-06-25 10:45:07 -0600 |
commit | e272f51b362cc008c3234c5c9862f7f51c0d01dd (patch) | |
tree | 4a51a4a19596c736abfb48bde418aa486ef9e383 | |
parent | c8ba859bc78f5e3b0ed2590f4e8a7fa6c26ac08f (diff) | |
download | libvirt-python-e272f51b362cc008c3234c5c9862f7f51c0d01dd.tar.gz |
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>
-rw-r--r-- | libvirt-override.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libvirt-override.c b/libvirt-override.c index 04fb4cd..40aefcc 100644 --- a/libvirt-override.c +++ b/libvirt-override.c @@ -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; } |