qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH V2] build: remove compile warning
@ 2013-06-07 10:02 Wenchao Xia
  2013-06-07 11:35 ` Stefan Hajnoczi
  2013-06-07 12:17 ` Markus Armbruster
  0 siblings, 2 replies; 13+ messages in thread
From: Wenchao Xia @ 2013-06-07 10:02 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, aliguori, mlureau, alevy, stefanha, pbonzini,
	Wenchao Xia

This patch simply remove "variable may be used uninitialized" warning.

Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
---
V2: Address Stefan and Peter's comments, use 0 in send_msg() instead of
initialize mhHeader.

 libcacard/vscclient.c |    3 +--
 util/iov.c            |    2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/libcacard/vscclient.c b/libcacard/vscclient.c
index ac23647..7fbf1da 100644
--- a/libcacard/vscclient.c
+++ b/libcacard/vscclient.c
@@ -641,7 +641,6 @@ main(
     GIOChannel *channel_stdin;
     char *qemu_host;
     char *qemu_port;
-    VSCMsgHeader mhHeader;
 
     VCardEmulOptions *command_line_options = NULL;
 
@@ -750,7 +749,7 @@ main(
         .magic = VSCARD_MAGIC,
         .capabilities = {0}
     };
-    send_msg(VSC_Init, mhHeader.reader_id, &init, sizeof(init));
+    send_msg(VSC_Init, 0, &init, sizeof(init));
 
     g_main_loop_run(loop);
     g_main_loop_unref(loop);
diff --git a/util/iov.c b/util/iov.c
index cc6e837..b91cfb9 100644
--- a/util/iov.c
+++ b/util/iov.c
@@ -146,7 +146,7 @@ ssize_t iov_send_recv(int sockfd, struct iovec *iov, unsigned iov_cnt,
 {
     ssize_t total = 0;
     ssize_t ret;
-    size_t orig_len, tail;
+    size_t orig_len = 0, tail;
     unsigned niov;
 
     while (bytes > 0) {
-- 
1.7.1

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

end of thread, other threads:[~2013-06-26  8:13 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-07 10:02 [Qemu-devel] [PATCH V2] build: remove compile warning Wenchao Xia
2013-06-07 11:35 ` Stefan Hajnoczi
2013-06-07 12:17 ` Markus Armbruster
2013-06-08  2:04   ` Wenchao Xia
2013-06-18 10:14     ` Paolo Bonzini
2013-06-18 10:13   ` Paolo Bonzini
2013-06-19  6:27     ` Wenchao Xia
2013-06-19  9:33       ` Paolo Bonzini
2013-06-22 10:03     ` Stefan Weil
2013-06-24 14:44       ` Paolo Bonzini
2013-06-24 17:58         ` Stefan Weil
2013-06-26  8:12           ` Paolo Bonzini
2013-06-25  1:50         ` Wenchao Xia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).