diff options
author | Wenchao Xia <xiawenc@linux.vnet.ibm.com> | 2013-03-26 10:24:06 +0800 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-04-02 08:15:40 -0500 |
commit | c707582b78d01d81fe4e470fd812334be145882d (patch) | |
tree | 31edbba96bcd337f1a1d413e7a395783396c1227 /hw/vmxnet3.c | |
parent | b1ee58290d7cc2c6b1231fd701987c1753ad9ae3 (diff) | |
download | qemu-c707582b78d01d81fe4e470fd812334be145882d.tar.gz qemu-c707582b78d01d81fe4e470fd812334be145882d.tar.bz2 qemu-c707582b78d01d81fe4e470fd812334be145882d.zip |
VMXNET3: initialize rx_ridx to eliminate compile warning
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>
Message-id: 1364264646-27542-1-git-send-email-xiawenc@linux.vnet.ibm.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/vmxnet3.c')
-rw-r--r-- | hw/vmxnet3.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/vmxnet3.c b/hw/vmxnet3.c index 925be8084a..bdd256e9d5 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; |