From d1c6c495541b6e387179f987acbef274a12c7535 Mon Sep 17 00:00:00 2001 From: Yann Gautier <yann.gautier@st.com> Date: Fri, 18 Nov 2022 13:43:32 +0100 Subject: [PATCH] fix(partition): add U suffix for unsigned numbers This corrects MISRA c2012-7.2 violation: A "u" or "U" suffix shall be applied to all integer constants that are represented in an unsigned type. Signed-off-by: Yann Gautier <yann.gautier@st.com> Change-Id: I5508a7d482213fc4d22e3e7ac53defb4135af596 --- include/drivers/partition/efi.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/include/drivers/partition/efi.h b/include/drivers/partition/efi.h index e463f9657..96c285737 100644 --- a/include/drivers/partition/efi.h +++ b/include/drivers/partition/efi.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2021, Linaro Limited + * Copyright (c) 2022, STMicroelectronics - All Rights Reserved * * SPDX-License-Identifier: BSD-3-Clause * @@ -25,13 +26,13 @@ static inline void *guidcpy(void *dst, const void *src) } #define EFI_GUID(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) \ - { (a) & 0xffffffff, \ - (b) & 0xffff, \ - (c) & 0xffff, \ + { (a) & 0xffffffffU, \ + (b) & 0xffffU, \ + (c) & 0xffffU, \ { (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) } } #define NULL_GUID \ - EFI_GUID(0x00000000, 0x0000, 0x0000, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00) + EFI_GUID(0x00000000U, 0x0000U, 0x0000U, 0x00U, 0x00U, \ + 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U) #endif /* DRIVERS_PARTITION_EFI_H */