mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-07 09:17:29 +00:00
Add -Wstrict-prototypes compiler warning
Disable it for the following extensions: - GD - pspell - readline Closes GH-5888
This commit is contained in:
4 files changed
+7
-3
No files matched your search
@@ -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
@@ -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 \
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
Reference in new issue
Block a user