KVM: x86 emulator: Eliminate compilation warning in x86_decode_insn()
authorSheng Yang <sheng@linux.intel.com>
Tue, 28 Sep 2010 08:33:32 +0000 (16:33 +0800)
committerAvi Kivity <avi@redhat.com>
Sun, 24 Oct 2010 08:53:09 +0000 (10:53 +0200)
Eliminate:
arch/x86/kvm/emulate.c:801: warning: ‘sv’ may be used uninitialized in this
function

on gcc 4.1.2

Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/emulate.c

index aead72e141b48bbc1c3cdde3a6f90d84410bd376..d0df25d84acd3c14fe1317b32f382dc206046faf 100644 (file)
@@ -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);