[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH v2 2/4] x86/mtrr: address MISRA C:2012 Rule 5.3



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)



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.