From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36311) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKJai-0001S8-Sq for qemu-devel@nongnu.org; Mon, 25 Mar 2013 22:26:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKJae-0006C6-6z for qemu-devel@nongnu.org; Mon, 25 Mar 2013 22:26:24 -0400 Received: from e28smtp05.in.ibm.com ([122.248.162.5]:49407) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKJad-0006BV-LA for qemu-devel@nongnu.org; Mon, 25 Mar 2013 22:26:20 -0400 Received: from /spool/local by e28smtp05.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 26 Mar 2013 07:53:26 +0530 Received: from d28relay04.in.ibm.com (d28relay04.in.ibm.com [9.184.220.61]) by d28dlp03.in.ibm.com (Postfix) with ESMTP id 0FA961258023 for ; Tue, 26 Mar 2013 07:57:25 +0530 (IST) Received: from d28av02.in.ibm.com (d28av02.in.ibm.com [9.184.220.64]) by d28relay04.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r2Q2Q76e5833144 for ; Tue, 26 Mar 2013 07:56:08 +0530 Received: from d28av02.in.ibm.com (loopback [127.0.0.1]) by d28av02.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r2Q2Q94W001846 for ; Tue, 26 Mar 2013 13:26:10 +1100 From: Wenchao Xia Date: Tue, 26 Mar 2013 10:24:06 +0800 Message-Id: <1364264646-27542-1-git-send-email-xiawenc@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH] VMXNET3: initialize rx_ridx to eliminate compile warning List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: dmitry@daynix.com, yan@daynix.com, Wenchao Xia , stefanha@redhat.com Gcc report "hw/vmxnet3.c:972: error: ‘rx_ridx’ may be used uninitialized in this function", so fix it. Signed-off-by: Wenchao Xia --- hw/vmxnet3.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/vmxnet3.c b/hw/vmxnet3.c index 925be80..bdd256e 100644 --- a/hw/vmxnet3.c +++ b/hw/vmxnet3.c @@ -969,7 +969,7 @@ vmxnet3_indicate_packet(VMXNET3State *s) struct Vmxnet3_RxDesc rxd; bool is_head = true; uint32_t rxd_idx; - uint32_t rx_ridx; + uint32_t rx_ridx = 0; struct Vmxnet3_RxCompDesc rxcd; uint32_t new_rxcd_gen = VMXNET3_INIT_GEN; -- 1.7.1