diff options
author | Bin Meng | 2021-09-12 11:15:16 +0800 |
---|---|---|
committer | Leo Yu-Chi Liang | 2021-10-20 10:59:09 +0800 |
commit | b18c4ae82f266d81281d63ac58945d92ed67afde (patch) | |
tree | 2736074739abe5029423d5a328c86c2cd2f8f49d /board | |
parent | d36c94279dd4fceab928cf60947ad876284de86a (diff) |
board: sifive: Fix -Wint-to-pointer-cast warning
The following warning is seen in unleashed.c in a 32-bit build:
warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
Cast with uintptr_t.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/sifive/unleashed/unleashed.c | 2 | ||||
-rw-r--r-- | board/sifive/unmatched/unmatched.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/board/sifive/unleashed/unleashed.c b/board/sifive/unleashed/unleashed.c index 33baeda9866..e7d2332d8c9 100644 --- a/board/sifive/unleashed/unleashed.c +++ b/board/sifive/unleashed/unleashed.c @@ -118,7 +118,7 @@ void *board_fdt_blob_setup(void) { if (IS_ENABLED(CONFIG_OF_SEPARATE)) { if (gd->arch.firmware_fdt_addr) - return (ulong *)gd->arch.firmware_fdt_addr; + return (ulong *)(uintptr_t)gd->arch.firmware_fdt_addr; } return (ulong *)&_end; diff --git a/board/sifive/unmatched/unmatched.c b/board/sifive/unmatched/unmatched.c index 8773b660faf..93c452c57fc 100644 --- a/board/sifive/unmatched/unmatched.c +++ b/board/sifive/unmatched/unmatched.c @@ -15,7 +15,7 @@ void *board_fdt_blob_setup(void) { if (IS_ENABLED(CONFIG_OF_SEPARATE)) { if (gd->arch.firmware_fdt_addr) - return (ulong *)gd->arch.firmware_fdt_addr; + return (ulong *)(uintptr_t)gd->arch.firmware_fdt_addr; } return (ulong *)&_end; |