From: Mo Yuxiang <Moyuxiang@xxxxxxxxxx> On compiling libvirt-python, we get such a warning: libvirt-qemu-override.c: In function ‘libvirt_qemu_virConnectDomainQemuMonitorEventRegister’: libvirt-qemu-override.c:304: warning: suggest explicit braces to avoid ambiguous ‘else’ Py_DECREF is a macro. The solution is to add brackets. Signed-off-by: Mo Yuxiang <Moyuxiang@xxxxxxxxxx> --- libvirt-qemu-override.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libvirt-qemu-override.c b/libvirt-qemu-override.c index 05ead30..8be3755 100644 --- a/libvirt-qemu-override.c +++ b/libvirt-qemu-override.c @@ -301,8 +301,9 @@ libvirt_qemu_virConnectDomainQemuMonitorEventRegister(PyObject *self ATTRIBUTE_U flags); LIBVIRT_END_ALLOW_THREADS; - if (ret < 0) + if (ret < 0) { Py_DECREF(pyobj_cbData); + } py_retval = libvirt_intWrap(ret); return py_retval; -- 1.7.12.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list