diff mbox series

[RFC,10/18] xen: cppcheck: misra rule 20.7 deviation on types.h

Message ID 20221220085100.22848-11-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 a violation of rule 20.7 for the macro
DECLARE_BITMAP, but the macro parameter is used as variable
identifier, so it is safe to suppress the finding and don't put
parenthesis.

Eclair and coverity does not report this finding.

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

Patch

diff --git a/xen/include/xen/types.h b/xen/include/xen/types.h
index 03f0fe612ed9..c734a52f24b1 100644
--- a/xen/include/xen/types.h
+++ b/xen/include/xen/types.h
@@ -7,6 +7,7 @@ 
 
 #define BITS_TO_LONGS(bits) \
     (((bits)+BITS_PER_LONG-1)/BITS_PER_LONG)
+/* SAF-1-false-positive-cppcheck R20.7 argument as text substitution */
 #define DECLARE_BITMAP(name,bits) \
     unsigned long name[BITS_TO_LONGS(bits)]