[PATCH] kvm/emulate.c warnings

From: Connor H
Date: Mon May 09 2011 - 01:47:33 EST


$ make allmodconfig
$ make
.....
arch/x86/kvm/emulate.c: In function 'emulate_sysexit':
arch/x86/kvm/emulate.c:1706: warning: 'cs_sel' may be used
uninitialized in this function
arch/x86/kvm/emulate.c:1706: warning: 'ss_sel' may be used
uninitialized in this function
......


patch to fix warnings.

--- a/arch/x86/kvm/emulate.c    2011-05-03 23:28:18.000000000 +0000
+++ b/arch/x86/kvm/emulate.c    2011-05-08 21:07:19.000000000 +0000
@@ -1703,7 +1703,7 @@
       struct desc_struct cs, ss;
       u64 msr_data;
       int usermode;
-       u16 cs_sel, ss_sel;
+       u16 cs_sel=0, ss_sel=0;

       /* inject #GP if in real mode or Virtual 8086 mode */
       if (ctxt->mode == X86EMUL_MODE_REAL ||
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/