@@ -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; \
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@arm.com> --- xen/include/public/arch-x86/xen-x86_64.h | 3 +++ 1 file changed, 3 insertions(+)