From: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: dmitry@daynix.com, yan@daynix.com,
Wenchao Xia <xiawenc@linux.vnet.ibm.com>,
stefanha@redhat.com
Subject: [Qemu-devel] [PATCH] VMXNET3: initialize rx_ridx to eliminate compile warning
Date: Tue, 26 Mar 2013 10:24:06 +0800 [thread overview]
Message-ID: <1364264646-27542-1-git-send-email-xiawenc@linux.vnet.ibm.com> (raw)
Gcc report "hw/vmxnet3.c:972: error: ‘rx_ridx’ may be used
uninitialized in this function", so fix it.
Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
---
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
next reply other threads:[~2013-03-26 2:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-26 2:24 Wenchao Xia [this message]
2013-03-26 9:16 ` [Qemu-devel] [PATCH] VMXNET3: initialize rx_ridx to eliminate compile warning Stefan Hajnoczi
2013-03-26 9:16 ` Stefan Hajnoczi
2013-03-27 13:21 ` Dmitry Fleytman
2013-04-02 20:21 ` Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1364264646-27542-1-git-send-email-xiawenc@linux.vnet.ibm.com \
--to=xiawenc@linux.vnet.ibm.com \
--cc=dmitry@daynix.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=yan@daynix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).