diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index 6efe66195d..aa65eb4dd0 100644 --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -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 `_ - Required diff --git a/xen/include/xen/perfc.h b/xen/include/xen/perfc.h index 7c5ce537bd..96022c0748 100644 --- a/xen/include/xen/perfc.h +++ b/xen/include/xen/perfc.h @@ -39,7 +39,7 @@ #define PERFSTATUS PERFCOUNTER #define PERFSTATUS_ARRAY PERFCOUNTER_ARRAY -enum perfcounter { +enum { #include NUM_PERFCOUNTERS };