Thread (2 messages) flat view 2 messages, 2 authors, 2008-07-14

Re: dtc: Enable and fix -Wpointer-arith warnings

From: Jon Loeliger <hidden>
Date: 2008-07-14 18:59:59

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 <redacted>
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:
quoted hunk ↗ jump to hunk
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help