On Fri, 2015-05-15 at 11:06 -0600, Charles Arnold wrote:
> Using gcc 4.8 to compile with -Werror.
> 
> xl_cmdimpl.c:5493:8: error: 'valid_devs' may be used uninitialized in this 
> function [-Werror=maybe-uninitialized]
>       if (valid_devs == 0)
>          ^
> xl_cmdimpl.c:5455:9: note: 'valid_devs' was declared here
>       int valid_devs;
> 
> Signed-off-by: Charles Arnold <carn...@suse.com>
> 
Reviewed-by: Dario Faggioli <dario.faggi...@citrix.com>

Although, while there...

> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> index 373aa37..6d60ce4 100644
> --- a/tools/libxl/xl_cmdimpl.c
> +++ b/tools/libxl/xl_cmdimpl.c
> @@ -5423,7 +5423,7 @@ static void output_topologyinfo(void)
>      libxl_cputopology *cpuinfo;
>      int i, nr;
>      libxl_pcitopology *pciinfo;
> -    int valid_devs;
> +    int valid_devs = 0;
>  
>
>      cpuinfo = libxl_get_cpu_topology(ctx, &nr);
> 
...You could kill one of the two blank line (one is enough).

Regards,
Dario

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to