All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kvm/emulate.c warnings
@ 2011-05-09  5:47 Connor H
  0 siblings, 0 replies; only message in thread
From: Connor H @ 2011-05-09  5:47 UTC (permalink / raw)
  To: linux-kernel

$ 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 ||

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-05-09  5:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-09  5:47 [PATCH] kvm/emulate.c warnings Connor H

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.