diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2008-07-07 10:10:48 +1000 |
---|---|---|
committer | Jon Loeliger <jdl@jdl.com> | 2008-07-14 12:36:08 -0500 |
commit | 36786db6154533b67d736b414ef63b4457009326 (patch) | |
tree | 73ddad751d647db11333552261873dc6293eec42 /tests/incbin.c | |
parent | 76e0622b687d795bb1379cf183c6ce8613e14658 (diff) | |
download | device-tree-compiler-36786db6154533b67d736b414ef63b4457009326.tar.gz |
dtc: Enable and fix -Wpointer-arith warnings
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>
Diffstat (limited to 'tests/incbin.c')
-rw-r--r-- | tests/incbin.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/incbin.c b/tests/incbin.c index 2f8a55a..5ab3508 100644 --- a/tests/incbin.c +++ b/tests/incbin.c @@ -31,10 +31,10 @@ #define CHUNKSIZE 1024 -void *load_file(const char *name, int *len) +char *load_file(const char *name, int *len) { FILE *f; - void *buf = NULL; + char *buf = NULL; int bufsize = 0, n; *len = 0; @@ -60,7 +60,8 @@ void *load_file(const char *name, int *len) int main(int argc, char *argv[]) { - void *fdt, *incbin; + void *fdt; + char *incbin; int len; test_init(argc, argv); |