diff mbox series

[RFC,04/18] arm: cppcheck: misra rule 20.7 deviation on config.h

Message ID 20221220085100.22848-5-luca.fancellu@arm.com (mailing list archive)
State Superseded
Headers show
Series cppcheck rule 20.7 fixes | expand

Commit Message

Luca Fancellu Dec. 20, 2022, 8:50 a.m. UTC
Cppcheck has found violations of rule 20.7 for the macros ENTRY(),
GLOBAL(), END() and ENDPROC(), but the macro parameters are never
used as an expression, they are used for text substitution but
cppcheck is not taking into account the context of them, so we can
suppress the findings.

Eclair and coverity does not report these findings.

Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
---
 xen/arch/arm/include/asm/config.h | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/xen/arch/arm/include/asm/config.h b/xen/arch/arm/include/asm/config.h
index 0fefed1b8aa9..c4843ddffe24 100644
--- a/xen/arch/arm/include/asm/config.h
+++ b/xen/arch/arm/include/asm/config.h
@@ -54,15 +54,19 @@ 
 /* Linkage for ARM */
 #ifdef __ASSEMBLY__
 #define ALIGN .align 2
+/* SAF-1-false-positive-cppcheck R20.7 argument as text substitution */
 #define ENTRY(name)                             \
   .globl name;                                  \
   ALIGN;                                        \
   name:
+/* SAF-1-false-positive-cppcheck R20.7 argument as text substitution */
 #define GLOBAL(name)                            \
   .globl name;                                  \
   name:
+/* SAF-1-false-positive-cppcheck R20.7 argument as text substitution */
 #define END(name) \
   .size name, .-name
+/* SAF-1-false-positive-cppcheck R20.7 argument as text substitution */
 #define ENDPROC(name) \
   .type name, %function; \
   END(name)