]> xenbits.xensource.com Git - xen.git/commitdiff
public: misra rule 20.7 fix on errno.h
authorLuca Fancellu <luca.fancellu@arm.com>
Thu, 22 Dec 2022 09:04:17 +0000 (10:04 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 22 Dec 2022 09:04:17 +0000 (10:04 +0100)
Cppcheck has found a violation of rule 20.7 for the macro XEN_ERRNO,
while the macro parameter is never used as an expression, it doesn't
harm the code or the readability to add parenthesis, so add them.

This finding is reported also by eclair and coverity.

Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/include/public/errno.h

index 6bdc8c5079907ffb174e2e956aaaf35738ad33a7..5a78a7607c0ddac82ea49a363a0a9fcfe2b885ae 100644 (file)
@@ -31,7 +31,7 @@
 
 #ifndef __ASSEMBLY__
 
-#define XEN_ERRNO(name, value) XEN_##name = value,
+#define XEN_ERRNO(name, value) XEN_##name = (value),
 enum xen_errno {
 
 #elif __XEN_INTERFACE_VERSION__ < 0x00040700