build-sys: add -Wwrite-strings
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
diff --git a/Makefile b/Makefile
index 23b4a3c..6ccee13 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@
CPPFLAGS = -I libfdt -I . -DFDT_ASSUME_MASK=$(ASSUME_MASK)
WARNINGS = -Wall -Wpointer-arith -Wcast-qual -Wnested-externs -Wsign-compare \
-Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wshadow \
- -Wsuggest-attribute=format
+ -Wsuggest-attribute=format -Wwrite-strings
CFLAGS = -g -Os $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS) $(EXTRA_CFLAGS)
BISON = bison
diff --git a/meson.build b/meson.build
index b2c53b9..cef113f 100644
--- a/meson.build
+++ b/meson.build
@@ -16,6 +16,7 @@
'-Wredundant-decls',
'-Wshadow',
'-Wsuggest-attribute=format',
+ '-Wwrite-strings',
]),
language: 'c'
)