Message ID | 20221220085100.22848-19-luca.fancellu@arm.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | cppcheck rule 20.7 fixes | expand |
On 20.12.2022 09:51, Luca Fancellu wrote: > Cppcheck has found a violation of rule 20.7 for the macro > XENMEM_SHARING_OP_FIELD_MAKE_GREF, the argument "val" is used in an > expression, hence add parenthesis to the argument "val" to fix the > violation. > > Signed-off-by: Luca Fancellu <luca.fancellu@arm.com> Acked-by: Jan Beulich <jbeulich@suse.com> again with an adjustment to the title. Jan
diff --git a/xen/include/public/memory.h b/xen/include/public/memory.h index 29cf5c823902..c5f0d31e235d 100644 --- a/xen/include/public/memory.h +++ b/xen/include/public/memory.h @@ -485,7 +485,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_mem_access_op_t); #define XENMEM_SHARING_OP_FIELD_IS_GREF_FLAG (xen_mk_ullong(1) << 62) #define XENMEM_SHARING_OP_FIELD_MAKE_GREF(field, val) \ - (field) = (XENMEM_SHARING_OP_FIELD_IS_GREF_FLAG | val) + (field) = (XENMEM_SHARING_OP_FIELD_IS_GREF_FLAG | (val)) #define XENMEM_SHARING_OP_FIELD_IS_GREF(field) \ ((field) & XENMEM_SHARING_OP_FIELD_IS_GREF_FLAG) #define XENMEM_SHARING_OP_FIELD_GET_GREF(field) \
Cppcheck has found a violation of rule 20.7 for the macro XENMEM_SHARING_OP_FIELD_MAKE_GREF, the argument "val" is used in an expression, hence add parenthesis to the argument "val" to fix the violation. Signed-off-by: Luca Fancellu <luca.fancellu@arm.com> --- xen/include/public/memory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)