From e52cc75f072fa604c840e1ef9ae2a2418d6d222f Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Tue, 15 Feb 2011 12:36:58 +0000 Subject: [PATCH] configure.ac: Add -Wpointer-arith to the maintainer CFLAGS GCC by default allows pointer arithmetic on void* pointers and treats them as having a size of 1 byte. This is non-standard behaviour and causes errors on some compilers so we should try to avoid it. -Wpointer-arith warns about these cases. --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 09ef918ab..93e309895 100644 --- a/configure.ac +++ b/configure.ac @@ -1096,7 +1096,8 @@ AC_ARG_ENABLE([maintainer-flags], MAINTAINER_COMPILER_FLAGS="-Wall -Wshadow -Wcast-align -Wuninitialized -Wno-strict-aliasing -Wempty-body -Wformat -Wformat-security -Winit-self - -Wdeclaration-after-statement -Wvla" + -Wdeclaration-after-statement -Wvla + -Wpointer-arith" AS_CASE([$enable_maintainer_flags], [yes],