[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] docs/misra: deviate deliberately unused labels
commit d97d6a7f08c6a5d43047ee029a71e87316ab7f4f Author: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx> AuthorDate: Mon Dec 4 19:23:11 2023 +0100 Commit: Stefano Stabellini <stefano.stabellini@xxxxxxx> CommitDate: Tue Dec 5 19:22:23 2023 -0800 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@xxxxxxxxxxx> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> --- automation/eclair_analysis/ECLAIR/deviations.ecl | 4 ++++ docs/misra/deviations.rst | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/eclair_analysis/ECLAIR/deviations.ecl index c9e3a90801..f18ed6345e 100644 --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -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. # diff --git a/docs/misra/deviations.rst b/docs/misra/deviations.rst index 160513b997..9979ddae7c 100644 --- a/docs/misra/deviations.rst +++ b/docs/misra/deviations.rst @@ -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. -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |