summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2011-03-22 11:51:00 +1030
committerRusty Russell <rusty@rustcorp.com.au>2011-03-22 11:51:00 +1030
commita95fc43fbef22efa0a41b3ce86a732bb57ad9ef5 (patch)
tree63e51ab5d36d27691bb52543eed556cddff48f4a
parent414da16fc2996a74f19f47ab7379ca61a723b425 (diff)
ccan: add -Wpointer-arith and -Wwrite-strings by default
Wpointer-arith is useful for spotting GCC-isms which do arithmetic on void pointers. Wwrite-strings treats string constants as const char *, which is sane (but bad for legacy code).
-rw-r--r--Makefile-ccan2
-rw-r--r--config.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/Makefile-ccan b/Makefile-ccan
index 22f1bbe5..ba83f4ae 100644
--- a/Makefile-ccan
+++ b/Makefile-ccan
@@ -3,7 +3,7 @@
# SRCFILES += $(wildcard ccan/*/*.c)
#CCAN_CFLAGS=-g -O3 -Wall -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations
-CCAN_CFLAGS=-g -Wall -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -DCCAN_STR_DEBUG=1
+CCAN_CFLAGS=-g -Wall -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wwrite-strings -DCCAN_STR_DEBUG=1
CFLAGS = $(CCAN_CFLAGS) -I. $(DEPGEN) -Werror
diff --git a/config.h b/config.h
index 682b4ce2..b0e5b02a 100644
--- a/config.h
+++ b/config.h
@@ -3,7 +3,7 @@
#define CCAN_CONFIG_H
#define _GNU_SOURCE /* Always use GNU extensions. */
#define CCAN_COMPILER "cc"
-#define CCAN_CFLAGS "-g -Wall -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -DCCAN_STR_DEBUG=1"
+#define CCAN_CFLAGS "-g -Wall -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wwrite-strings -DCCAN_STR_DEBUG=1"
#define HAVE_ALIGNOF 1
#define HAVE_ASPRINTF 1