Bug #76350 [NEW]: comparison of distinct pointer types lacks a cast

From: Date: Thu, 17 May 2018 00:31:50 +0000
Subject: Bug #76350 [NEW]: comparison of distinct pointer types lacks a cast
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-215291@lists.php.net to get a copy of this message
From: ailyin+php_add4_to_if_ind at anchorfree dot com Operating system: alpine PHP version: 7.1.17 Package: Compile Warning Bug Type: Bug Bug description:comparison of distinct pointer types lacks a cast Description: ------------ /usr/src/php/ext/sockets/multicast.c: In function 'php_add4_to_if_index': /usr/src/php/ext/sockets/multicast.c:793:6: warning: comparison of distinct pointer types lacks a cast p < if_conf.ifc_buf + if_conf.ifc_len; ^ Test script: --------------- FROM php:7.1-fpm-alpine AS build-env RUN docker-php-source extract RUN echo '@edge-main http://dl-cdn.alpinelinux.org/alpine/edge/main' >> /etc/apk/repositories RUN echo '@edge-community http://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories RUN echo '@edge-testing http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories RUN apk update RUN apk add --upgrade apk-tools@edge-main RUN apk add \ coreutils \ postgresql-dev@edge-main \ libmcrypt-dev \ bzip2-dev \ libpng-dev \ libxslt-dev \ gettext-dev \ autoconf \ g++ \ make \ cmake \ geoip-dev \ libmemcached-dev \ cyrus-sasl-dev \ pcre-dev \ git \ file \ freetype-dev \ libjpeg-turbo-dev \ re2c \ libressl-dev@edge-main \ rabbitmq-c-dev@edge-main RUN docker-php-ext-configure \ gd --with-freetype-dir=/usr/lib --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib RUN docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) \ mcrypt \ mysqli \ bz2 \ opcache \ calendar \ gd \ pcntl \ xsl \ soap \ shmop \ sysvmsg \ sysvsem \ sysvshm \ sockets \ pdo_mysql \ pdo_pgsql \ pgsql \ wddx Expected result: ---------------- No warning message in the build log. Actual result: -------------- /usr/src/php/ext/sockets/multicast.c: In function 'php_add4_to_if_index': /usr/src/php/ext/sockets/multicast.c:793:6: warning: comparison of distinct pointer types lacks a cast p < if_conf.ifc_buf + if_conf.ifc_len; ^ -- Edit bug report at https://bugs.php.net/bug.php?id=76350&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76350&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76350&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76350&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=76350&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=76350&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=76350&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=76350&r=needscript Try newer version: https://bugs.php.net/fix.php?id=76350&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=76350&r=support Expected behavior: https://bugs.php.net/fix.php?id=76350&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=76350&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=76350&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=76350&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76350&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=76350&r=dst IIS Stability: https://bugs.php.net/fix.php?id=76350&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=76350&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=76350&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=76350&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=76350&r=mysqlcfg

« previous php.bugs (#215291) next »