Received: from eggs.gnu.org ([2001:4830:134:3::10]:42612) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkRKO-0006I9-Rv for qemu-devel@nongnu.org; Wed, 05 Jun 2013 23:57:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UkRKO-0007Pe-1j for qemu-devel@nongnu.org; Wed, 05 Jun 2013 23:57:32 -0400 Received: from e28smtp09.in.ibm.com ([122.248.162.9]:58316) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkRKN-0007PS-Fz for qemu-devel@nongnu.org; Wed, 05 Jun 2013 23:57:31 -0400 Received: from /spool/local by e28smtp09.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 6 Jun 2013 09:23:12 +0530 Received: from d28relay02.in.ibm.com (d28relay02.in.ibm.com [9.184.220.59]) by d28dlp03.in.ibm.com (Postfix) with ESMTP id 94DDB1258053 for ; Thu, 6 Jun 2013 09:29:34 +0530 (IST) Received: from d28av04.in.ibm.com (d28av04.in.ibm.com [9.184.220.66]) by d28relay02.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r563vKHa7405934 for ; Thu, 6 Jun 2013 09:27:20 +0530 Received: from d28av04.in.ibm.com (loopback [127.0.0.1]) by d28av04.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r563vNJU029612 for ; Thu, 6 Jun 2013 13:57:23 +1000 From: Wenchao Xia Date: Thu, 6 Jun 2013 11:55:36 +0800 Message-Id: <1370490936-11327-1-git-send-email-xiawenc@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH] build: remove compile warning List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, alevy@redhat.com, stefanha@redhat.com, pbonzini@redhat.com, mlureau@redhat.com, Wenchao Xia This patch simply remove "variable may be used uninitialized" warning. Signed-off-by: Wenchao Xia --- 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