public inbox for devicetree-compiler@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fdtdump: fix -Werror=int-to-pointer-cast
@ 2021-08-25 12:13 marcandre.lureau-H+wXaHxf7aLQT0dZR+AlfA
       [not found] ` <20210825121350.213551-1-marcandre.lureau-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: marcandre.lureau-H+wXaHxf7aLQT0dZR+AlfA @ 2021-08-25 12:13 UTC (permalink / raw)
  To: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA
  Cc: david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

With mingw64-gcc, the compiler complains with various warnings:
error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]

Signed-off-by: Marc-André Lureau <marcandre.lureau-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 fdtdump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fdtdump.c b/fdtdump.c
index bdc0f94..d424869 100644
--- a/fdtdump.c
+++ b/fdtdump.c
@@ -21,7 +21,7 @@
 #define MAX_VERSION 17U
 
 #define ALIGN(x, a)	(((x) + ((a) - 1)) & ~((a) - 1))
-#define PALIGN(p, a)	((void *)(ALIGN((unsigned long)(p), (a))))
+#define PALIGN(p, a)	((void *)(ALIGN((uintptr_t)(p), (a))))
 #define GET_CELL(p)	(p += 4, *((const fdt32_t *)(p-4)))
 
 static const char *tagname(uint32_t tag)
-- 
2.33.0.rc2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-26  0:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-25 12:13 [PATCH] fdtdump: fix -Werror=int-to-pointer-cast marcandre.lureau-H+wXaHxf7aLQT0dZR+AlfA
     [not found] ` <20210825121350.213551-1-marcandre.lureau-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2021-08-25 15:14   ` Rob Herring
2021-08-26  0:58   ` David Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox