All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools/libxl: Fix build following c/s c3c8da9
@ 2015-06-29 12:41 Andrew Cooper
  2015-06-29 14:09 ` Ian Jackson
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cooper @ 2015-06-29 12:41 UTC (permalink / raw)
  To: Xen-devel; +Cc: Andrew Cooper, Ian Jackson, Ian Campbell, Wei Liu

c/s c3c8da9 "libxl: ao: datacopier callback gets an rc" caused
libxl__domain_save_device_model() to pass its rc directly into the callback.

However in the preexisting code, there were 3 "goto out;" paths which left rc
uninitialised, which is cause by GCC 4.8's -Wmaybe-uninitialized

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
---
 tools/libxl/libxl_dom.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c
index 600393d..d547eb5 100644
--- a/tools/libxl/libxl_dom.c
+++ b/tools/libxl/libxl_dom.c
@@ -2147,7 +2147,7 @@ void libxl__domain_save_device_model(libxl__egc *egc,
     STATE_AO_GC(dss->ao);
     struct stat st;
     uint32_t qemu_state_len;
-    int rc;
+    int rc = -1;
 
     dss->save_dm_callback = callback;
 
-- 
1.7.10.4

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

end of thread, other threads:[~2015-06-29 14:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-29 12:41 [PATCH] tools/libxl: Fix build following c/s c3c8da9 Andrew Cooper
2015-06-29 14:09 ` Ian Jackson
2015-06-29 14:22   ` Andrew Cooper
2015-06-29 14:29     ` Ian Jackson
2015-06-29 14:32       ` [PATCH] libxl: Fix uninitialised rc in libxl__domain_save_device_model Ian Jackson

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.