From: Bin Meng Date: Sun, 12 Sep 2021 03:15:16 +0000 (+0800) Subject: board: sifive: Fix -Wint-to-pointer-cast warning X-Git-Tag: v2025.01-rc5-pxa1908~1674^2~1 X-Git-Url: http://git.dujemihanovic.xyz/html/static/gitweb.css?a=commitdiff_plain;h=b18c4ae82f266d81281d63ac58945d92ed67afde;p=u-boot.git 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 Reviewed-by: Leo Yu-Chi Liang --- diff --git a/board/sifive/unleashed/unleashed.c b/board/sifive/unleashed/unleashed.c index 33baeda986..e7d2332d8c 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 8773b660fa..93c452c57f 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;