mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
automation/eclair: update configuration of D4.10
MISRA C Directive 4.10 states that "Precautions shall be taken in order to prevent the contents of a header file being included more than once". Add a SAF tag and update the comment on top of cpufeatures.h. Add a header inclusion guard to compile.h. Generate header guards for hypercall-defs.h Update ECLAIR configuration to: - extend existing deviation to other comments explicitly saying a file is intended for multiple inclusion; - extend existing deviation to other autogenerated files; - tag the guidelines as clean. Update deviations.rst accordingly. Signed-off-by: Federico Serafini <federico.serafini@bugseng.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com> Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
047a94b3fe
commit
67b99a3691
7 files changed
+33
-7
No files matched your search
@@ -72,11 +72,14 @@ they are not instances of commented-out code."
|
||||
-config=MC3A2.D4.3,reports+={deliberate, "any_area(any_loc(file(arm64_bitops))&&context(name(int_clear_mask16)))"}
|
||||
-doc_end
|
||||
|
||||
-doc_begin="Files that are intended to be included more than once do not need to
|
||||
conform to the directive."
|
||||
-doc_begin="Files that are intended to be included more than once (and have
|
||||
a comment that says this explicitly) do not need to conform to the directive."
|
||||
-config=MC3A2.D4.10,reports+={safe, "first_area(text(^/\\* This file is intended to be included multiple times\\. \\*/$, begin-4))"}
|
||||
-config=MC3A2.D4.10,reports+={safe, "first_area(text(^/\\* Generated file, do not edit! \\*/$, begin-3))"}
|
||||
-config=MC3A2.D4.10,reports+={safe, "all_area(all_loc(file(^xen/include/generated/autoconf.h$)))"}
|
||||
-config=MC3A2.D4.10,reports+={safe, "first_area(text(^/\\* Generated file, do not edit! \\*/$, begin-3...begin-2))"}
|
||||
-doc_end
|
||||
|
||||
-doc_begin="Autogenerated files that do not need to conform to the directive."
|
||||
-config=MC3A2.D4.10,reports+={safe, "all_area(all_loc(file(^xen/include/generated/autoconf\\.h$)))"}
|
||||
-doc_end
|
||||
|
||||
-doc_begin="Including multiple times a .c file is safe because every function or data item
|
||||
|
||||