From 6876487abd8041cd2a718ed7dd9ff6d86560b1ee Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Fri, 13 Jan 2017 11:50:09 +0100 Subject: expr: Add const qualifiers to *2str translation arrays MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add const qualifiers to the "to string" translation arrays used by various *2str() functions. This fixes GCC warnings such as the following when compiling with -Wwrite-strings: expr/byteorder.c:176:25: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] In order to catch these in the future, also add -Wwrite-strings to default CFLAGS. Signed-off-by: Tobias Klauser Signed-off-by: Pablo Neira Ayuso --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 4777c5e..2b74e52 100644 --- a/configure.ac +++ b/configure.ac @@ -40,7 +40,7 @@ AS_IF([test "x$with_json_parsing" = "xyes"], [ ]) regular_CFLAGS="-Wall -Waggregate-return -Wmissing-declarations \ -Wmissing-prototypes -Wshadow -Wstrict-prototypes \ - -Wformat=2 -pipe" + -Wformat=2 -Wwrite-strings -pipe" AC_SUBST([regular_CPPFLAGS]) AC_SUBST([regular_CFLAGS]) AC_CONFIG_FILES([Makefile src/Makefile include/Makefile include/libnftnl/Makefile include/linux/Makefile include/linux/netfilter/Makefile examples/Makefile tests/Makefile libnftnl.pc doxygen.cfg]) -- cgit v1.2.3