|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [RFC PATCH 15/18] public/x86: cppcheck: misra rule 20.7 deviation on xen-x86_64.h
Cppcheck has found violations of rule 20.7 for the macros
__DECL_REG_LOHI, __DECL_REG_LO8 and __DECL_REG_LO16, but the macro
parameters are used as variable identifiers, so it is safe to
suppress the findings.
Eclair and coverity does not report these findings.
Signed-off-by: Luca Fancellu <luca.fancellu@xxxxxxx>
---
xen/include/public/arch-x86/xen-x86_64.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/xen/include/public/arch-x86/xen-x86_64.h
b/xen/include/public/arch-x86/xen-x86_64.h
index 5d9035ed2230..7e375cd6f45f 100644
--- a/xen/include/public/arch-x86/xen-x86_64.h
+++ b/xen/include/public/arch-x86/xen-x86_64.h
@@ -115,6 +115,7 @@ struct iret_context {
#if defined(__XEN__) || defined(__XEN_TOOLS__)
/* Anonymous unions include all permissible names (e.g., al/ah/ax/eax/rax). */
+/* SAF-1-false-positive-cppcheck R20.7 argument as text substitution */
#define __DECL_REG_LOHI(which) union { \
uint64_t r ## which ## x; \
uint32_t e ## which ## x; \
@@ -124,12 +125,14 @@ struct iret_context {
uint8_t which ## h; \
}; \
}
+/* SAF-1-false-positive-cppcheck R20.7 argument as text substitution */
#define __DECL_REG_LO8(name) union { \
uint64_t r ## name; \
uint32_t e ## name; \
uint16_t name; \
uint8_t name ## l; \
}
+/* SAF-1-false-positive-cppcheck R20.7 argument as text substitution */
#define __DECL_REG_LO16(name) union { \
uint64_t r ## name; \
uint32_t e ## name; \
--
2.17.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |