mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen/include: make enum perfcounter anonymous
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@bugseng.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
1 parent
7211904e09
commit
ea083911b1
2 files changed
+4
-1
No files matched your search
@@ -341,6 +341,9 @@ maintainers if you want to suggest a change.
|
||||
compilers' extensions)
|
||||
- Implicit conversions to boolean for conditionals (?: if while
|
||||
for) and logical operators (! || &&)
|
||||
- The essential type model allows the constants defined by anonymous
|
||||
enums (e.g., enum { A, B, C }) to be used as operands to arithmetic
|
||||
operators, as they have a signed essential type.
|
||||
|
||||
* - `Rule 10.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_10_02.c>`_
|
||||
- Required
|
||||
|
||||