From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: marcandre.lureau-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Cc: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] fdtdump: fix -Werror=int-to-pointer-cast
Date: Thu, 26 Aug 2021 10:58:40 +1000 [thread overview]
Message-ID: <YSbnQFADMTN7IpLB@yekko> (raw)
In-Reply-To: <20210825121350.213551-1-marcandre.lureau-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1212 bytes --]
On Wed, Aug 25, 2021 at 04:13:50PM +0400, marcandre.lureau-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org wrote:
> 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>
Applied, thanks.
> ---
> 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)
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2021-08-26 0:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
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=YSbnQFADMTN7IpLB@yekko \
--to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
--cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=marcandre.lureau-H+wXaHxf7aLQT0dZR+AlfA@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).