Skip to content

Commit d1c6c49

Browse files
committed
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 <[email protected]> Change-Id: I5508a7d482213fc4d22e3e7ac53defb4135af596
1 parent 1290662 commit d1c6c49

File tree

1 file changed

+6
-5
lines changed
  • include/drivers/partition

1 file changed

+6
-5
lines changed

include/drivers/partition/efi.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
22
* Copyright (c) 2021, Linaro Limited
3+
* Copyright (c) 2022, STMicroelectronics - All Rights Reserved
34
*
45
* SPDX-License-Identifier: BSD-3-Clause
56
*
@@ -25,13 +26,13 @@ static inline void *guidcpy(void *dst, const void *src)
2526
}
2627

2728
#define EFI_GUID(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) \
28-
{ (a) & 0xffffffff, \
29-
(b) & 0xffff, \
30-
(c) & 0xffff, \
29+
{ (a) & 0xffffffffU, \
30+
(b) & 0xffffU, \
31+
(c) & 0xffffU, \
3132
{ (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) } }
3233

3334
#define NULL_GUID \
34-
EFI_GUID(0x00000000, 0x0000, 0x0000, 0x00, 0x00, \
35-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00)
35+
EFI_GUID(0x00000000U, 0x0000U, 0x0000U, 0x00U, 0x00U, \
36+
0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U)
3637

3738
#endif /* DRIVERS_PARTITION_EFI_H */

0 commit comments

Comments
 (0)