From: marcandre.lureau-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
To: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org,
"Marc-André Lureau"
<marcandre.lureau-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: [PATCH] fdtdump: fix -Werror=int-to-pointer-cast
Date: Wed, 25 Aug 2021 16:13:50 +0400 [thread overview]
Message-ID: <20210825121350.213551-1-marcandre.lureau@redhat.com> (raw)
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
next reply other threads:[~2021-08-25 12:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-25 12:13 marcandre.lureau-H+wXaHxf7aLQT0dZR+AlfA [this message]
[not found] ` <20210825121350.213551-1-marcandre.lureau-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2021-08-25 15:14 ` [PATCH] fdtdump: fix -Werror=int-to-pointer-cast Rob Herring
2021-08-26 0:58 ` David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210825121350.213551-1-marcandre.lureau@redhat.com \
--to=marcandre.lureau-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org \
--cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).