php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76350 comparison of distinct pointer types lacks a cast
Submitted: 2018-05-17 00:31 UTC Modified: -
From: ailyin+php_add4_to_if_ind at anchorfree dot com Assigned:
Status: Open Package: Compile Warning
PHP Version: 7.1.17 OS: alpine
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ailyin+php_add4_to_if_ind at anchorfree dot com
New email:
PHP Version: OS:

 

 [2018-05-17 00:31 UTC] ailyin+php_add4_to_if_ind at anchorfree dot com
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;
      ^

Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon May 27 03:01:26 2019 UTC