x86/PV: drop a local variable from pv_emulate_gate_op()
PATCH v3 1/1 x86/PV: drop a local variable from pv_emulate_gate_op()
The inner "rc" shadows the function scope one, thus violating Misra C:2012 rule 5.3 ("An identifier declared in an inner scope shall not hide an identifier declared in an outer scope"). Drop the inner variable, as there's no other (later) use of the value it holds.
No difference in generated code.
---
v3: Use alternative approach.
v2: Re-base.
xen/arch/x86/pv/emul-gate-op.c +0 -1
@@ -287,7 +287,6 @@ void pv_emulate_gate_op(struct cpu_user_ {unsigned int ss, esp, *stkp;uint32_t value; -int rc;#define push (item) do \ { \ value = (item); \
Quoted 8 lines · Jan Beulich
The inner "rc" shadows the function scope one, thus violating Misra C:2012 rule 5.3 ("An identifier declared in an inner scope shall not hide an identifier declared in an outer scope"). Drop the inner variable, as there's no other (later) use of the value it holds.
No difference in generated code.
Signed-off-by Jan Beulich <[email protected]>
Quoted 15 lines · Jan Beulich
The inner "rc" shadows the function scope one, thus violating Misra C:2012 rule 5.3 ("An identifier declared in an inner scope shall not hide an identifier declared in an outer scope"). Drop the inner variable, as there's no other (later) use of the value it holds.
No difference in generated code.
Signed-off-by Jan Beulich <[email protected]>---
v3: Use alternative approach.
v2: Re-base.
xen/arch/x86/pv/emul-gate-op.c void pv_emulate_gate_op(struct cpu_user_ · line 292
Quoted 7 lines
xen/arch/x86/pv/emul-gate-op.c +0
-1@@ -287,7 +287,6 @@ void pv_emulate_gate_op(struct cpu_user_ {unsigned int ss, esp, *stkp;uint32_t value; -int rc;#define push (item) do \ { \ value = (item); \
Thanks.
~ Oleksii