Bug #79924 [NEW]: compile warnings with --disable-ipv6 --enable-sockets
| From: | santi at mola dot io | Date: | Sun, 02 Aug 2020 14:40:44 +0000 |
| Subject: | Bug #79924 [NEW]: compile warnings with --disable-ipv6 --enable-sockets | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-228376@lists.php.net to get a copy of this message | ||
From: santi at mola dot io
Operating system: Linux
PHP version: 8.0.0alpha3
Package: Compile Warning
Bug Type: Bug
Bug description:compile warnings with --disable-ipv6 --enable-sockets
Description:
------------
multiple compile warnings with --disable-ipv6 --enable-sockets.
Marked version PHP 8, but some warnings are probably present in most
previous releases too.
Test script:
---------------
#!/bin/sh
set -ex
make clean || true
./buildconf -f
./configure --disable-all --disable-phpdbg --disable-ipv6
--enable-sockets --enable-werror
make -j $(nproc)
Actual result:
--------------
[...]
| ^~~~~~~~~~~~~~~~~~~~~~~
/__w/php-src/php-src/ext/sockets/conversions.c:505:13: error:
'to_zval_read_uint32' defined but not used [-Werror=unused-function]
505 | static void to_zval_read_uint32(const char *data, zval *zv,
res_context *ctx)
| ^~~~~~~~~~~~~~~~~~~
/__w/php-src/php-src/ext/sockets/conversions.c:491:13: error:
'to_zval_read_unsigned' defined but not used [-Werror=unused-function]
491 | static void to_zval_read_unsigned(const char *data, zval *zv,
res_context *ctx)
| ^~~~~~~~~~~~~~~~~~~~~
/bin/bash /__w/php-src/php-src/libtool --silent --preserve-dup-deps
--mode=compile cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -Iext/sockets/
-I/__w/php-src/php-src/ext/sockets/ -DPHP_ATOM_INC
-I/__w/php-src/php-src/include -I/__w/php-src/php-src/main
-I/__w/php-src/php-src -I/__w/php-src/php-src/ext/date/lib
-I/usr/include/libxml2 -I/usr/include/x86_64-linux-gnu
-I/usr/include/enchant -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libpng16
-I/usr/include/freetype2 -I/__w/php-src/php-src/ext/mbstring/libmbfl
-I/__w/php-src/php-src/ext/mbstring/libmbfl/mbfl
-I/usr/include/postgresql -I/usr/include/pspell -I/usr/include/tidy
-I/__w/php-src/php-src/TSRM -I/__w/php-src/php-src/Zend
-I/usr/include -g -O2 -fvisibility=hidden -Wall -Wextra
-Wno-strict-aliasing -Wno-implicit-fallthrough -Wno-unused-parameter
-Wno-sign-compare -Wno-clobbered -DZEND_SIGNALS -Werror -c
/__w/php-src/php-src/ext/sockets/sockaddr_conv.c -o
ext/sockets/sockaddr_conv.lo
/__w/php-src/php-src/ext/sockets/conversions.c: In function
'from_zval_write_controllen':
/__w/php-src/php-src/ext/sockets/conversions.c:1116:24: error: 'len' may
be used uninitialized in this function [-Werror=maybe-uninitialized]
1116 | msghdr->msg_control = accounted_emalloc(len, ctx);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:1685: ext/sockets/conversions.lo] Error 1
[...]
--
Edit bug report at https://bugs.php.net/bug.php?id=79924&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79924&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79924&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79924&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79924&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79924&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79924&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79924&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79924&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79924&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79924&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79924&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79924&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79924&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79924&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79924&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79924&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79924&r=mysqlcfg