qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH] build: remove compile warning


From: Wenchao Xia
Subject: [Qemu-devel] [PATCH] build: remove compile warning
Date: Thu, 6 Jun 2013 11:55:36 +0800

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

Signed-off-by: Wenchao Xia <address@hidden>
---
 libcacard/vscclient.c |    2 +-
 util/iov.c            |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libcacard/vscclient.c b/libcacard/vscclient.c
index ac23647..815f453 100644
--- a/libcacard/vscclient.c
+++ b/libcacard/vscclient.c
@@ -641,7 +641,7 @@ main(
     GIOChannel *channel_stdin;
     char *qemu_host;
     char *qemu_port;
-    VSCMsgHeader mhHeader;
+    VSCMsgHeader mhHeader = {0};
 
     VCardEmulOptions *command_line_options = NULL;
 
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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]