]> xenbits.xensource.com Git - xen.git/commitdiff
xen: add deviations for MISRA C 2012 Dir D4.10
authorMaria Celeste Cesario <maria.celeste.cesario@bugseng.com>
Wed, 31 Jul 2024 12:51:13 +0000 (14:51 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 31 Jul 2024 12:51:13 +0000 (14:51 +0200)
Add safe deviation for *.c files, as estabilished in past discussion.

Signed-off-by: Maria Celeste Cesario <maria.celeste.cesario@bugseng.com>
Signed-off-by: Simone Ballarin <simone.ballarin@bugseng.com>
Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Signed-off-by: Alessandro Zucchelli <alessandro.zucchelli@bugseng.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
automation/eclair_analysis/ECLAIR/deviations.ecl
docs/misra/deviations.rst

index 31b2ec669a235f605ebe20c482ada6cc83237967..1aa8277066ea6356faa43a6f59db1ec3cd611f11 100644 (file)
@@ -78,6 +78,11 @@ conform to the directive."
 -config=MC3R1.D4.10,reports+={safe, "first_area(text(^/\\* Generated file, do not edit! \\*/$, begin-3))"}
 -doc_end
 
+-doc_begin="Including multiple times a .c file is safe because every function or data item
+it defines would (in the common case) be already defined. Peer reviewed by the community."
+-config=MC3R1.D4.10,reports+={safe, "all_area(all_loc(^.*\\.c$))"}
+-doc_end
+
 #
 # Series 5.
 #
index 1ecce1469a8fc1a461df5440ba2fc62a24fb16a6..d51aa422b537cc2aaa20698ba745d5929f82f197 100644 (file)
@@ -30,6 +30,12 @@ Deviations related to MISRA C:2012 Directives:
        not to add an additional encapsulation layer.
      - Tagged as `deliberate` for ECLAIR.
 
+   * - D4.10
+     - Including multiple times a .c file is safe because every function or data item
+       it defines would in (the common case) be already defined.
+       Peer reviewed by the community.
+     - Tagged as `safe` for ECLAIR.
+
 Deviations related to MISRA C:2012 Rules:
 -----------------------------------------