Commit a95fc43f authored by Rusty Russell's avatar Rusty Russell

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).
parent 414da16f
......@@ -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
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment