diff options
author | George Peter Banyard <girgias@php.net> | 2020-02-05 17:36:41 +0100 |
---|---|---|
committer | George Peter Banyard <girgias@php.net> | 2020-04-14 22:22:35 +0200 |
commit | 1c334db4c818eb4175e9e246f3fc5d91bcfe1eef (patch) | |
tree | 23b9673a9d2707c042ef672e0935c9658504d549 /Zend/Zend.m4 | |
parent | a2a6c7f2272dc62c9da249186afcccdd8c4abca7 (diff) | |
download | php-git-1c334db4c818eb4175e9e246f3fc5d91bcfe1eef.tar.gz |
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
Diffstat (limited to 'Zend/Zend.m4')
-rw-r--r-- | Zend/Zend.m4 | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Zend/Zend.m4 b/Zend/Zend.m4 index fc4634580e..7c715e853b 100644 --- a/Zend/Zend.m4 +++ b/Zend/Zend.m4 @@ -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 |