[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC PATCH 02/18] arm: cppcheck: misra rule 20.7 deviation on processor.h



Cppcheck has found a violation of rule 20.7 for the macro __DECL_REG,
but the macro parameters are never used as an expression, they are
used for text substitution and adding parenthesis would break the
code. Cppcheck is not taking into account the context of use of the
macro argument, so we can suppress the finding.

Eclair and coverity does not report this finding.

Signed-off-by: Luca Fancellu <luca.fancellu@xxxxxxx>
---
 xen/arch/arm/include/asm/arm64/processor.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/arm/include/asm/arm64/processor.h 
b/xen/arch/arm/include/asm/arm64/processor.h
index c749f80ad91b..aacbe5d4d538 100644
--- a/xen/arch/arm/include/asm/arm64/processor.h
+++ b/xen/arch/arm/include/asm/arm64/processor.h
@@ -4,7 +4,7 @@
 #ifndef __ASSEMBLY__
 
 /* Anonymous union includes both 32- and 64-bit names (e.g., r0/x0). */
-
+/* SAF-1-false-positive-cppcheck R20.7 argument as text substitution */
 #define __DECL_REG(n64, n32) union {            \
     uint64_t n64;                               \
     uint32_t n32;                               \
-- 
2.17.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.