Skip to contentSkip to conversation

KVM: x86 emulator: Eliminate compilation warning in x86_decode_insn()

PATCH Applied Sheng Yang 2 participants 2 messages Sep 28, 2010 – Sep 30, 2010

Subsystems (3)
lore
Share & tools
lore

Sheng Yang

author
#0 lore raw

PATCH 1/1 KVM: x86 emulator: Eliminate compilation warning in x86_decode_insn()

Eliminate:
arch/x86/kvm/emulate.c:801: warning: ‘sv’ may be used uninitialized in this function

on gcc 4.1.2

---
 arch/x86/kvm/emulate.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kvm/emulate.c +1 -1
index aead72e..d0df25d 100644
@@ -798,7 +798,7 @@ done:
 
 static void fetch_bit_operand(struct decode_cache *c)
 {
-	long sv, mask;
+	long sv = 0, mask;
 
 	if (c->dst.type == OP_MEM && c->src.type == OP_REG) {
 		mask = ~(c->dst.bytes * 8 - 1);
Signature · 1 line
1.7.0.1
#1 lore raw
Quoted 10 lines · Sheng Yang

Eliminate:
arch/x86/kvm/emulate.c:801: warning: ‘sv’ may be used uninitialized in this function

on gcc 4.1.2

---
 arch/x86/kvm/emulate.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.