mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
automation/eclair: add deviations for Rule 20.7
These deviations deal with the following cases:
- macro arguments used directly as initializer list arguments;
- uses of the __config_enabled macro, that can't be brought
into compliance without breaking its functionality;
- exclude files that are out of scope (efi headers and cpu_idle);
- uses of alternative_{call,vcall}[0-9] macros.
The existing configuration for R20.7 is reordered so that it matches the
cases listed in its documentation comment.
Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
1 parent
6bdb67d19e
commit
80d28865e1
3 files changed
+37
-4
No files matched your search
@@ -345,7 +345,19 @@ Deviations related to MISRA C:2012 Rules:
|
||||
(1) as function arguments;
|
||||
(2) as macro arguments;
|
||||
(3) as array indices;
|
||||
(4) as lhs in assignments.
|
||||
(4) as lhs in assignments;
|
||||
(5) as initializers, possibly designated, in initalizer lists.
|
||||
- Tagged as `safe` for ECLAIR.
|
||||
|
||||
* - R20.7
|
||||
- Violations due to the use of macros defined in files that are not
|
||||
in scope for compliance are allowed, as that is imported code.
|
||||
- Tagged as `safe` for ECLAIR.
|
||||
|
||||
* - R20.7
|
||||
- To avoid compromising readability, the macros `alternative_(v)?call[0-9]`
|
||||
are allowed not to parenthesize their arguments, as there are already
|
||||
sanity checks in place.
|
||||
- Tagged as `safe` for ECLAIR.
|
||||
|
||||
* - R20.12
|
||||
|
||||
@@ -561,7 +561,7 @@ maintainers if you want to suggest a change.
|
||||
shall be enclosed in parentheses
|
||||
- Extra parentheses are not required when macro parameters are used
|
||||
as function arguments, as macro arguments, array indices, lhs in
|
||||
assignments
|
||||
assignments or as initializers in initalizer lists.
|
||||
|
||||
* - `Rule 20.9 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_20_09.c>`_
|
||||
- Required
|
||||
|
||||