-
由 Valdis Kletnieks 提交于
Compiler warning: CC [M] arch/x86/kvm/emulate.o arch/x86/kvm/emulate.c: In function "__do_insn_fetch_bytes": arch/x86/kvm/emulate.c:814:9: warning: "linear" may be used uninitialized in this function [-Wmaybe-uninitialized] GCC is smart enough to realize that the inlined __linearize may return before setting the value of linear, but not smart enough to realize the same X86EMU_CONTINUE blocks actual use of the value. However, the value of 'linear' can only be set to one value, so hoisting the one line of code upwards makes GCC happy with the code. Reported-by: NAruna Hewapathirane <aruna.hewapathirane@gmail.com> Tested-by: NAruna Hewapathirane <aruna.hewapathirane@gmail.com> Signed-off-by: NValdis Kletnieks <valdis.kletnieks@vt.edu> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
e8dd2d2d