From: Jon Loeliger <jdl@jdl.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: dtc: Enable and fix -Wpointer-arith warnings
Date: Mon, 14 Jul 2008 13:59:59 -0500 [thread overview]
Message-ID: <E1KITHD-0006sd-Kq@jdl.com> (raw)
In-Reply-To: <20080707001048.GC6267@yookeroo.seuss>
> This patch turns on the -Wpointer-arith option in the dtc Makefile,
> and fixes the resulting warnings due to using (void *) in pointer
> arithmetic. While convenient, pointer arithmetic on void * is not
> portable, so it's better that we avoid it, particularly in libfdt.
>
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This patch didn't apply. I tracked it down to bad context
in the Makefile where this appeared:
> CPPFLAGS += -std=c99 -D_XOPEN_SOURCE -D_BSD_SOURCE
> CFLAGS += -Werror
but the file had this instead:
> BISON = bison
> LEX = flex
in this part:
> Index: dtc/Makefile
> ===================================================================
> --- dtc.orig/Makefile 2008-07-04 11:48:05.000000000 +1000
> +++ dtc/Makefile 2008-07-04 16:54:42.000000000 +1000
> @@ -16,7 +16,7 @@
> CONFIG_LOCALVERSION =
>
> CPPFLAGS = -I libfdt
> -CFLAGS = -Wall -g -Os
> +CFLAGS = -Wall -g -Os -Wpointer-arith
>
> CPPFLAGS += -std=c99 -D_XOPEN_SOURCE -D_BSD_SOURCE
> CFLAGS += -Werror
Again, I hand whacked-the patch mail and applied it.
For the love-of-Pete, please use git.
jdl
prev parent reply other threads:[~2008-07-14 18:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-07 0:10 dtc: Enable and fix -Wpointer-arith warnings David Gibson
2008-07-14 18:59 ` Jon Loeliger [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=E1KITHD-0006sd-Kq@jdl.com \
--to=jdl@jdl.com \
--cc=david@gibson.dropbear.id.au \
--cc=linuxppc-dev@ozlabs.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