1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 16:38:25 +02:00

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

Closes GH-5151
This commit is contained in:
George Peter Banyard
2020-02-05 17:36:41 +01:00
parent a2a6c7f227
commit 1c334db4c8
+4 -1
View File
@@ -221,7 +221,10 @@ else
AC_DEFINE(ZEND_DEBUG,0,[ ])
fi
test -n "$GCC" && CFLAGS="$CFLAGS -Wall -Wno-strict-aliasing"
test -n "$GCC" && CFLAGS="$CFLAGS -Wall -Wextra -Wno-strict-aliasing -Wno-implicit-fallthrough -Wno-unused-parameter -Wno-sign-compare"
dnl Check if compiler supports -Wno-clobbered (only GCC)
AX_CHECK_COMPILE_FLAG([-Wno-clobbered], CFLAGS="$CFLAGS -Wno-clobbered", , [-Werror])
test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS"
if test "$ZEND_ZTS" = "yes"; then