Add -Wpointer-arith to AG_GST_SET_ERROR_CFLAGS
authorDavid Schleef <ds@schleef.org>
Fri, 13 Feb 2009 21:29:59 +0000 (13:29 -0800)
committerDavid Schleef <ds@schleef.org>
Fri, 13 Feb 2009 21:40:37 +0000 (13:40 -0800)
Some compilers throw errors for void* arithmetic, so enabling
this allows us to check it in gcc.  Besides, void* arithmetic
is invalid.

m4/gst-error.m4

index 6500450..c5ce242 100644 (file)
@@ -37,6 +37,10 @@ AC_DEFUN([AG_GST_SET_ERROR_CFLAGS],
   AS_COMPILER_FLAG(-Wvla,
         ERROR_CFLAGS="$ERROR_CFLAGS -Wvla")
 
+  dnl Warn for invalid pointer arithmetic
+  AS_COMPILER_FLAG(-Wpointer-arith,
+        ERROR_CFLAGS="$ERROR_CFLAGS -Wpointer-arith")
+
   dnl if asked for, add -Werror if supported
   if test "x$1" != "xno"
   then