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

[Xen-devel] [PATCH] libxl: 'valid_devs' may be used uninitialized



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 <carnold@xxxxxxxx>

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);



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.