Skip to content

Commit 1a48979

Browse files
committed
Add -Wextra compiler warnings and exclude the trigger happy ones
The compile warnings which are explicitly suppressed are: * -Wno-implicit-fallthrough * -Wno-unused-parameter * -Wno-sign-compare * -Wno-clobbered, only with GCC
1 parent e8393f0 commit 1a48979

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Zend/Zend.m4

+4-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,10 @@ else
221221
AC_DEFINE(ZEND_DEBUG,0,[ ])
222222
fi
223223
224-
test -n "$GCC" && CFLAGS="$CFLAGS -Wall -Wno-strict-aliasing"
224+
test -n "$GCC" && CFLAGS="$CFLAGS -Wall -Wno-strict-aliasing -Wextra -Wno-implicit-fallthrough -Wno-unused-parameter -Wno-sign-compare"
225+
dnl Check if compiler supports -Wn-clobbered (only GCC)
226+
AX_CHECK_COMPILE_FLAG([-Wno-clobbered], CFLAGS="$CFLAGS -Wno-clobbered", , [-Werror])
227+
225228
test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS"
226229
227230
if test "$ZEND_ZTS" = "yes"; then

0 commit comments

Comments
 (0)