Skip to content

Broken build with GCC 14 [-Wincompatible-pointer-types]  #42

@remicollet

Description

@remicollet

This was a warning
This is now a error using GCC 14 (on Fedora 40)

/builddir/build/BUILD/php82-php-pecl-tensor-3.0.4/tensor-3.0.4/ext/kernel/require.c: In function 'zephir_require_ret':
/builddir/build/BUILD/php82-php-pecl-tensor-3.0.4/tensor-3.0.4/ext/kernel/require.c:54:19: error: passing argument 1 of 'zval_ptr_dtor' from incompatible pointer type [-Wincompatible-pointer-types]
   54 |     zval_ptr_dtor(zend_string_path);
      |                   ^~~~~~~~~~~~~~~~
      |                   |
      |                   zend_string * {aka struct _zend_string *}
In file included from /opt/remi/php82/root/usr/include/php/Zend/zend.h:36,
                 from /opt/remi/php82/root/usr/include/php/main/php.h:31,
                 from /builddir/build/BUILD/php82-php-pecl-tensor-3.0.4/tensor-3.0.4/ext/kernel/require.c:16:
/opt/remi/php82/root/usr/include/php/Zend/zend_variables.h:79:35: note: expected 'zval *' {aka 'struct _zval_struct *'} but argument is of type 'zend_string *' {aka 'struct _zend_string *'}
   79 | ZEND_API void zval_ptr_dtor(zval *zval_ptr);
      |                             ~~~~~~^~~~~~~~
/builddir/build/BUILD/php82-php-pecl-tensor-3.0.4/tensor-3.0.4/ext/kernel/require.c: In function 'zephir_require_once_ret':
/builddir/build/BUILD/php82-php-pecl-tensor-3.0.4/tensor-3.0.4/ext/kernel/require.c:127:19: error: passing argument 1 of 'zval_ptr_dtor' from incompatible pointer type [-Wincompatible-pointer-types]
  127 |     zval_ptr_dtor(zend_string_path);
      |                   ^~~~~~~~~~~~~~~~
      |                   |
      |                   zend_string * {aka struct _zend_string *}
/opt/remi/php82/root/usr/include/php/Zend/zend_variables.h:79:35: note: expected 'zval *' {aka 'struct _zval_struct *'} but argument is of type 'zend_string *' {aka 'struct _zend_string *'}
   79 | ZEND_API void zval_ptr_dtor(zval *zval_ptr);
      |                             ~~~~~~^~~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions