diff options
author | Roberto Vargas <roberto.vargas@arm.com> | 2018-05-09 11:27:30 +0100 |
---|---|---|
committer | Roberto Vargas <roberto.vargas@arm.com> | 2018-05-09 11:36:10 +0100 |
commit | d92a2863365f7dcb8caf8b6f9535d6a8870e81cb (patch) | |
tree | 912cf5aba3091ba61bb13cd26a1ea45e46bcef1f | |
parent | a83a74d2308400245209192c6e49d8370d6e8a2b (diff) |
xlat: Fix warning in CHECK_VIRT_ADDR_SPACE_SIZE
When TF is compiled for aarch32 MAX_VIRT_ADDR_SPACE_SIZE is 2^32 in some cases,
which makes the test (size) <= MAX_VIRT_ADDR_SPACE_SIZE a tautology because
uintptr_t is a 32 bit value. The cast remove the warning for clang.
Change-Id: I1345f3400f8fbbe4ffd3caa990a90e7ba593dba5
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
-rw-r--r-- | include/lib/xlat_tables/xlat_tables_arch.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/lib/xlat_tables/xlat_tables_arch.h b/include/lib/xlat_tables/xlat_tables_arch.h index 165b161d..af8c4633 100644 --- a/include/lib/xlat_tables/xlat_tables_arch.h +++ b/include/lib/xlat_tables/xlat_tables_arch.h @@ -21,8 +21,8 @@ * limits. Not that these limits are different for AArch32 and AArch64. */ #define CHECK_VIRT_ADDR_SPACE_SIZE(size) \ - (((size) >= MIN_VIRT_ADDR_SPACE_SIZE) && \ - ((size) <= MAX_VIRT_ADDR_SPACE_SIZE) && \ + (((unsigned long long)(size) >= MIN_VIRT_ADDR_SPACE_SIZE) && \ + ((unsigned long long)(size) <= MAX_VIRT_ADDR_SPACE_SIZE) && \ IS_POWER_OF_TWO(size)) /* |