configure.ac: Add -Wpointer-arith to the maintainer CFLAGS
authorNeil Roberts <neil@linux.intel.com>
Tue, 15 Feb 2011 12:36:58 +0000 (12:36 +0000)
committerNeil Roberts <neil@linux.intel.com>
Tue, 15 Feb 2011 14:26:17 +0000 (14:26 +0000)
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

index 09ef918..93e3098 100644 (file)
@@ -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],