Skip to content

Commit

Permalink
KVM: x86 emulator: Eliminate compilation warning in x86_decode_insn()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sheng Yang authored and Avi Kivity committed Oct 24, 2010
1 parent 5093362 commit 7129eec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kvm/emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ static int decode_abs(struct x86_emulate_ctxt *ctxt,

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);
Expand Down

0 comments on commit 7129eec

Please sign in to comment.