All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libxl: 'valid_devs' may be used uninitialized
@ 2015-05-15 17:06 Charles Arnold
  2015-05-15 17:39 ` Dario Faggioli
  0 siblings, 1 reply; 3+ messages in thread
From: Charles Arnold @ 2015-05-15 17:06 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Campbell

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@suse.com>

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-05-21 14:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-15 17:06 [PATCH] libxl: 'valid_devs' may be used uninitialized Charles Arnold
2015-05-15 17:39 ` Dario Faggioli
2015-05-21 14:52   ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.