mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
docs/misra: add exceptions to rules
During the discussions that led to the acceptance of the Rules, we decided on a few exceptions that were not properly recorded in rules.rst. Other times, the exceptions were decided later when it came to enabling a rule in ECLAIR. Either way, update rules.rst with appropriate notes. Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com> Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
6a35ba8872
commit
b0cd7499dd
1 file changed
+10
-5
+10
-5
@@ -59,7 +59,8 @@ maintainers if you want to suggest a change.
|
|||||||
- Required
|
- Required
|
||||||
- Precautions shall be taken in order to prevent the contents of a
|
- Precautions shall be taken in order to prevent the contents of a
|
||||||
header file being included more than once
|
header file being included more than once
|
||||||
-
|
- Files that are intended to be included more than once do not need to
|
||||||
|
conform to the directive
|
||||||
|
|
||||||
* - `Dir 4.11 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/D_04_11.c>`_
|
* - `Dir 4.11 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/D_04_11.c>`_
|
||||||
- Required
|
- Required
|
||||||
@@ -117,7 +118,7 @@ maintainers if you want to suggest a change.
|
|||||||
- Required
|
- Required
|
||||||
- The character sequences /* and // shall not be used within a
|
- The character sequences /* and // shall not be used within a
|
||||||
comment
|
comment
|
||||||
-
|
- Comments containing hyperlinks inside C-style block comments are safe
|
||||||
|
|
||||||
* - `Rule 3.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_03_02.c>`_
|
* - `Rule 3.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_03_02.c>`_
|
||||||
- Required
|
- Required
|
||||||
@@ -239,13 +240,15 @@ maintainers if you want to suggest a change.
|
|||||||
- Required
|
- Required
|
||||||
- All declarations of an object or function shall use the same
|
- All declarations of an object or function shall use the same
|
||||||
names and type qualifiers
|
names and type qualifiers
|
||||||
-
|
- The type ret_t maybe be deliberately used and defined as int or
|
||||||
|
long depending on the type of guest to service
|
||||||
|
|
||||||
* - `Rule 8.4 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_08_04.c>`_
|
* - `Rule 8.4 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_08_04.c>`_
|
||||||
- Required
|
- Required
|
||||||
- A compatible declaration shall be visible when an object or
|
- A compatible declaration shall be visible when an object or
|
||||||
function with external linkage is defined
|
function with external linkage is defined
|
||||||
-
|
- Allowed exceptions: asm-offsets.c, definitions for asm modules
|
||||||
|
not called from C code, gcov_base.c
|
||||||
|
|
||||||
* - `Rule 8.5 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_08_05_2.c>`_
|
* - `Rule 8.5 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_08_05_2.c>`_
|
||||||
- Required
|
- Required
|
||||||
@@ -369,7 +372,9 @@ maintainers if you want to suggest a change.
|
|||||||
- Required
|
- Required
|
||||||
- Expressions resulting from the expansion of macro parameters
|
- Expressions resulting from the expansion of macro parameters
|
||||||
shall be enclosed in parentheses
|
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
|
||||||
|
|
||||||
* - `Rule 20.13 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_20_13.c>`_
|
* - `Rule 20.13 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_20_13.c>`_
|
||||||
- Required
|
- Required
|
||||||
|
|||||||