[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] build: Fix build warning on libvirt-python



Ping. [python PATCH]

On 2014/8/8 17:55, Wang Rui wrote:
> From: Mo Yuxiang <Moyuxiang huawei com>
> 
> 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 huawei com>
> ---
>  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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]