On 07/08/2023 14:48, Jan Beulich wrote:
On 04.08.2023 22:45, Stefano Stabellini wrote:
On Fri, 4 Aug 2023, Nicola Vetrini wrote:
Rename variables to avoid shadowing and thus address
MISRA C:2012 Rule 5.3:
"An identifier declared in an inner scope shall not hide an
identifier declared in an outer scope".
The shadowing happens between the struct declaration 'mtrr_state' in
'xen/arch/x86/include/asm/mtrr.h' and local variable names.
Let's try to be precise: The issue isn't with the struct declaration,
but with the declaration of the global variable of that name a few
lines later. Afaict - please clarify.
Yes, my wording is wrong.
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)