Add -Wstrict-prototypes compiler warning

Disable it for the following extensions:
 - GD
 - pspell
 - readline

Closes GH-5888
This commit is contained in:
George Peter Banyard committed 2021-05-12 19:02:48 +01:00
1 parent ff988a6f4f
commit 96adc806e0
4 files changed
+7 -3

No files matched your search

+1
View File
@@ -214,6 +214,7 @@ AX_CHECK_COMPILE_FLAG([-Wimplicit-fallthrough=1], CFLAGS="$CFLAGS -Wimplicit-fal
AX_CHECK_COMPILE_FLAG([-Wduplicated-cond], CFLAGS="-Wduplicated-cond $CFLAGS", , [-Werror])
AX_CHECK_COMPILE_FLAG([-Wlogical-op], CFLAGS="-Wlogical-op $CFLAGS", , [-Werror])
AX_CHECK_COMPILE_FLAG([-Wformat-truncation], CFLAGS="-Wformat-truncation $CFLAGS", , [-Werror])
AX_CHECK_COMPILE_FLAG([-Wstrict-prototypes], CFLAGS="-Wstrict-prototypes $CFLAGS", , [-Werror])
AX_CHECK_COMPILE_FLAG([-fno-common], CFLAGS="-fno-common $CFLAGS", , [-Werror])
test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS"
+2 -1
View File
@@ -138,7 +138,8 @@ dnl
if test "$PHP_GD" != "no"; then
if test "$PHP_EXTERNAL_GD" = "no"; then
GD_CFLAGS=""
dnl Disable strict prototypes as GD takes advantages of variadic function signatures for function pointers.
GD_CFLAGS="-Wno-strict-prototypes"
extra_sources="libgd/gd.c libgd/gd_gd.c libgd/gd_gd2.c libgd/gd_io.c libgd/gd_io_dp.c \
libgd/gd_io_file.c libgd/gd_ss.c libgd/gd_io_ss.c libgd/gd_webp.c \
libgd/gd_png.c libgd/gd_jpeg.c libgd/gdxpm.c libgd/gdfontt.c libgd/gdfonts.c \
+2 -1
View File
@@ -4,7 +4,8 @@ PHP_ARG_WITH([pspell],
[Include PSPELL support. GNU Aspell version 0.50.0 or higher required])])
if test "$PHP_PSPELL" != "no"; then
PHP_NEW_EXTENSION(pspell, pspell.c, $ext_shared)
dnl Add -Wno-strict-prototypes as depends on user libs
PHP_NEW_EXTENSION(pspell, pspell.c, $ext_shared, , "-Wno-strict-prototypes")
if test "$PHP_PSPELL" != "yes"; then
PSPELL_SEARCH_DIRS=$PHP_PSPELL
else
+2 -1
View File
@@ -137,6 +137,7 @@ elif test "$PHP_LIBEDIT" != "no"; then
fi
if test "$PHP_READLINE" != "no" || test "$PHP_LIBEDIT" != "no"; then
PHP_NEW_EXTENSION(readline, readline.c readline_cli.c, $ext_shared, cli)
dnl Add -Wno-strict-prototypes as depends on user libs
PHP_NEW_EXTENSION(readline, readline.c readline_cli.c, $ext_shared, cli, "-Wno-strict-prototypes")
PHP_SUBST(READLINE_SHARED_LIBADD)
fi