docs/misra: add 14.3

Add 14.3, with project-wide deviations.

Also take the opportunity to clarify that parameters of function pointer
types are expected to have names (Rule 8.2).

Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Bertrand Marquis <bertrand.marquis@arm.com>
Release-acked-by: Henry Wang <Henry.Wang@arm.com>
This commit is contained in:
Stefano Stabellini committed 2023-09-29 11:00:47 -07:00
1 parent 2797a71712
commit b1c84ab41a
1 file changed
+14 -1
+14 -1
View File
@@ -234,7 +234,8 @@ maintainers if you want to suggest a change.
* - `Rule 8.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_08_02.c>`_ * - `Rule 8.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_08_02.c>`_
- Required - Required
- Function types shall be in prototype form with named parameters - Function types shall be in prototype form with named parameters
- - Clarification: both function and function pointers types shall
have named parameters.
* - `Rule 8.3 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_08_03.c>`_ * - `Rule 8.3 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_08_03.c>`_
- Required - Required
@@ -395,6 +396,18 @@ maintainers if you want to suggest a change.
- A loop counter shall not have essentially floating type - A loop counter shall not have essentially floating type
- -
* - `Rule 14.3 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_14_03.c>`_
- Required
- Controlling expressions shall not be invariant
- Due to the extensive usage of IS_ENABLED, sizeof compile-time
checks, and other constructs that are detected as errors by MISRA
C scanners, managing the configuration of a MISRA C scanner for
this rule would be unmanageable. Thus, this rule is adopted with
a project-wide deviation on if, ?:, switch(sizeof(...)), and
switch(offsetof(...)) statements.
while(0) and while(1) and alike are allowed.
* - `Rule 16.7 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_16_07.c>`_ * - `Rule 16.7 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_16_07.c>`_
- Required - Required
- A switch-expression shall not have essentially Boolean type - A switch-expression shall not have essentially Boolean type
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.