]> xenbits.xensource.com Git - xen.git/commitdiff
x86emul: remove local variable to address MISRA C:2012 Rule 5.3
authorNicola Vetrini <nicola.vetrini@bugseng.com>
Mon, 31 Jul 2023 13:07:29 +0000 (15:07 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 31 Jul 2023 13:07:29 +0000 (15:07 +0200)
The local variable removed by this commit shadowed another declared in
an outer scope and thus violates Rule 5.3. It was introduced as part of
a refactoring by commit abf5fb62f73d0dbeabc6a8cd6dbb55174b36c8d1.

No functional changes.

Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/x86_emulate/x86_emulate.c

index f811c1c76b43b28f3b33f71899700698c6e2d2b8..60bd2f8d8ec196b601cf0e884b2473f2e6560f03 100644 (file)
@@ -8408,8 +8408,6 @@ x86_emulate(
         generate_exception(X86_EXC_MF);
     if ( stub_exn.info.fields.trapnr == X86_EXC_XM )
     {
-        unsigned long cr4;
-
         if ( !ops->read_cr || ops->read_cr(4, &cr4, ctxt) != X86EMUL_OKAY )
             cr4 = X86_CR4_OSXMMEXCPT;
         generate_exception(cr4 & X86_CR4_OSXMMEXCPT ? X86_EXC_XM : X86_EXC_UD);