diff options
author | Wenchao Xia | 2013-03-26 03:24:06 +0100 |
---|---|---|
committer | Anthony Liguori | 2013-04-02 15:15:40 +0200 |
commit | c707582b78d01d81fe4e470fd812334be145882d (patch) | |
tree | 31edbba96bcd337f1a1d413e7a395783396c1227 /hw/vmxnet3.c | |
parent | qdev: only send deleted event if device was realized (diff) | |
download | qemu-c707582b78d01d81fe4e470fd812334be145882d.tar.gz qemu-c707582b78d01d81fe4e470fd812334be145882d.tar.xz 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; |