1Fix the build of fdtdump with mingw. 2 3Upstream-Status: Backport 4Signed-off-by: Ross Burton <ross.burton@arm.com> 5 6From ae0ce1fa7f4d679b5f8df1fc0e797246e43547fe Mon Sep 17 00:00:00 2001 7From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com> 8Date: Wed, 25 Aug 2021 16:13:50 +0400 9Subject: [PATCH] fdtdump: fix -Werror=int-to-pointer-cast 10MIME-Version: 1.0 11Content-Type: text/plain; charset=UTF-8 12Content-Transfer-Encoding: 8bit 13 14With mingw64-gcc, the compiler complains with various warnings: 15error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] 16 17Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> 18Message-Id: <20210825121350.213551-1-marcandre.lureau@redhat.com> 19Acked-by: Rob Herring <robh@kernel.org> 20Signed-off-by: David Gibson <david@gibson.dropbear.id.au> 21--- 22 fdtdump.c | 2 +- 23 1 file changed, 1 insertion(+), 1 deletion(-) 24 25diff --git a/fdtdump.c b/fdtdump.c 26index d9fb374..483f367 100644 27--- a/fdtdump.c 28+++ b/fdtdump.c 29@@ -21,7 +21,7 @@ 30 #define MAX_VERSION 17 31 32 #define ALIGN(x, a) (((x) + ((a) - 1)) & ~((a) - 1)) 33-#define PALIGN(p, a) ((void *)(ALIGN((unsigned long)(p), (a)))) 34+#define PALIGN(p, a) ((void *)(ALIGN((uintptr_t)(p), (a)))) 35 #define GET_CELL(p) (p += 4, *((const fdt32_t *)(p-4))) 36 37 static const char *tagname(uint32_t tag) 38-- 392.25.1 40 41