docs/misra: deviate deliberately unused labels

The labels marked with __maybe_unused are either used only
in certain build configurations or deliberately unused.
See the justification in docs/misra/deviations.rst.

No functional changes.

Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
Nicola Vetrini authored and Stefano Stabellini committed 2023-12-05 19:22:23 -08:00
1 parent 4c6142a1ab
commit d97d6a7f08
2 files changed
+12

No files matched your search

@@ -37,6 +37,10 @@ removed by the compiler, the resulting slowdown is negligible."
-config=MC3R1.R2.2,reports+={disapplied,"any()"}
-doc_end
-doc_begin="Some labels are unused in certain build configurations, or are deliberately marked as unused, so that the compiler is entitled to remove them."
-config=MC3R1.R2.6,reports+={deliberate, "any_area(text(^.*__maybe_unused.*$))"}
-doc_end
#
# Series 3.
#
+8
View File
@@ -73,6 +73,14 @@ Deviations related to MISRA C:2012 Rules:
resulting slowdown is negligible.
- Project-wide deviation, tagged as `disapplied` for ECLAIR.
* - R2.6
- Labels deliberately marked as unused trough the pseudo-attribute
`__maybe_unused` are either the result of them not being in certain build
configurations, or as a deliberate practice (e.g., `unimplemented_insn`).
Given that the compiler is then entitled to remove them, the presence of
such labels poses no risks.
- Tagged as `deliberate` for ECLAIR.
* - R3.1
- Comments starting with '/\*' and containing hyperlinks are safe as they
are not instances of commented-out code.
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.