Message ID | 20221220085100.22848-3-luca.fancellu@arm.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | cppcheck rule 20.7 fixes | expand |
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; \
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@arm.com> --- xen/arch/arm/include/asm/arm64/processor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)