Bug #79924 [Ver->Csd]: compile warnings with --disable-ipv6 --enable-sockets
| From: | nikic@php.net | Date: | Mon, 03 Aug 2020 12:57:17 +0000 |
| Subject: | Bug #79924 [Ver->Csd]: compile warnings with --disable-ipv6 --enable-sockets | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-228390@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79924&edit=1
ID: 79924
Updated by: nikic@php.net
Reported by: santi at mola dot io
Summary: compile warnings with --disable-ipv6
--enable-sockets
-Status: Verified
+Status: Closed
Type: Bug
Package: Compile Warning
PHP Version: Supported versions
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of nikita.ppv@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=8b4da1774f2e8ba74579675460c37e0ebe723fdc
Log: Fix bug #79924
Previous Comments:
------------------------------------------------------------------------
[2020-08-02 21:04:27] carusogabriel@php.net
With the provided
Test script, it's confirmed that this happens in PHP 7.3 and PHP
7.4 as well.
These functions should be moved under a flag check for IPV6
(https://github.com/php/php-src/blob/1e0bc6e30f/ext/sockets/conversions.c#L589-L642)
------------------------------------------------------------------------
[2020-08-02 14:40:44] santi at mola dot io
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 this bug report at https://bugs.php.net/bug.php?id=79924&edit=1