|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH][for-4.19] xen/include: make enum perfcounter anonymous
On 11/10/2023 15:03, Nicola Vetrini wrote: Using enumerators declared in a named enum, such as the one modified,as operands to arithmetic operators is not allowed by MISRA C:2012 Rule 10.1.The enumerators of an anonymous enum can be used instead. Signed-off-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx> --- This violation manifeststs itself, for instance, in all uses of macro 'perfc_incra' from xen/include/xen/perfc.h, because the expansioncontains an arithmetic operation on two enum constants from enum perfcounter. See [1] for a discussion on the possible alternatives to this approach. [1] https://marc.info/?l=xen-devel&m=169658364229813 -- Nicola Vetrini, BSc Software Engineer, BUGSENG srl (https://bugseng.com)
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |