clang: test fix unsigned type overflow
Fixes build issue with clang 12.0.5:
../../test/arch/mm_test.c:123:1: error: overflow in expression; result is -971710464 with type 'int' [-Werror,-Winteger-overflow]
EXPAND_LEVEL_TESTS
../../test/arch/mm_test.c:148:1: error: overflow in expression; result is -1398804480 with type 'int' [-Werror,-Winteger-overflow]
Change-Id: Iff1dbd4dda2e3207c64e05cabb5f42399a7c57dd
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
diff --git a/test/arch/mm_test.c b/test/arch/mm_test.c
index bb0337a..353513d 100644
--- a/test/arch/mm_test.c
+++ b/test/arch/mm_test.c
@@ -113,7 +113,7 @@
} \
\
block_pte = arch_mm_block_pte( \
- level, pa_init(PAGE_SIZE * 12345678), attrs); \
+ level, pa_init(PAGE_SIZE * 12345678U), attrs); \
\
EXPECT_TRUE(arch_mm_pte_is_present(block_pte, level)); \
EXPECT_TRUE(arch_mm_pte_is_valid(block_pte, level)); \
@@ -137,8 +137,8 @@
return; \
} \
\
- table_pte = arch_mm_table_pte(level, \
- pa_init(PAGE_SIZE * 999999999)); \
+ table_pte = arch_mm_table_pte( \
+ level, pa_init(PAGE_SIZE * 999999999U)); \
\
EXPECT_TRUE(arch_mm_pte_is_present(table_pte, level)); \
EXPECT_TRUE(arch_mm_pte_is_valid(table_pte, level)); \