[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] VMXNET3: initialize rx_ridx to eliminate compile wa
From: |
Wenchao Xia |
Subject: |
[Qemu-devel] [PATCH] VMXNET3: initialize rx_ridx to eliminate compile warning |
Date: |
Tue, 26 Mar 2013 10:24:06 +0800 |
Gcc report "hw/vmxnet3.c:972: error: ‘rx_ridx’ may be used
uninitialized in this function", so fix it.
Signed-off-by: Wenchao Xia <address@hidden>
---
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
- [Qemu-devel] [PATCH] VMXNET3: initialize rx_ridx to eliminate compile warning,
Wenchao Xia <=