Message ID | 20221220085100.22848-4-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/asm_defns.h b/xen/arch/arm/include/asm/asm_defns.h index 29a9dbb002fa..9bf4cf8891f5 100644 --- a/xen/arch/arm/include/asm/asm_defns.h +++ b/xen/arch/arm/include/asm/asm_defns.h @@ -22,11 +22,13 @@ # error "unknown ARM variant" #endif +/* SAF-1-false-positive-cppcheck R20.7 argument as text substitution */ #define RODATA_STR(label, msg) \ .pushsection .rodata.str, "aMS", %progbits, 1 ; \ label: .asciz msg; \ .popsection +/* SAF-1-false-positive-cppcheck R20.7 argument as text substitution */ #define ASM_INT(label, val) \ .p2align 2; \ label: .long (val); \
Cppcheck has found violations of rule 20.7 for the macros RODATA_STR() and ASM_INT(), but the macro parameters are never used as an expression, they are used for text subtitution and cppcheck is not taking into account the context of use for them, so we can suppress the finding. Eclair and coverity does not report these findings. Signed-off-by: Luca Fancellu <luca.fancellu@arm.com> --- xen/arch/arm/include/asm/asm_defns.h | 2 ++ 1 file changed, 2 insertions(+)