pecl-file_formats-yaml icon indicating copy to clipboard operation
pecl-file_formats-yaml copied to clipboard

PHP 8.3: Warning about passing argument 1 of 'zval_ptr_dtor' from incompatible pointer type

Open kdambekalns opened this issue 2 years ago • 3 comments

Here is what the compilation says:

/opt/php/src/ext/yaml/parse.c: In function 'handle_sequence':
/opt/php/src/ext/yaml/parse.c:534:18: warning: passing argument 1 of 'zval_ptr_dtor' from incompatible pointer type [-Wincompatible-pointer-types]
  534 |    zval_ptr_dtor(&retval);
      |                  ^~~~~~~
      |                  |
      |                  zval ** {aka struct _zval_struct **}
In file included from /opt/php/include/php/Zend/zend.h:36,
                 from /opt/php/include/php/main/php.h:31,
                 from /opt/php/src/ext/yaml/php_yaml.h:46,
                 from /opt/php/src/ext/yaml/parse.c:36:
/opt/php/include/php/Zend/zend_variables.h:79:35: note: expected 'zval *' {aka 'struct _zval_struct *'} but argument is of type 'zval **' {aka 'struct _zval_struct **'}
   79 | ZEND_API void zval_ptr_dtor(zval *zval_ptr);
      |                             ~~~~~~^~~~~~~~

kdambekalns avatar Nov 06 '23 15:11 kdambekalns

That warning was fixed by https://github.com/php/pecl-file_formats-yaml/pull/74 (https://github.com/php/pecl-file_formats-yaml/commit/e7bffc01c496ef36ce672c612984b13a27426788). This and a few other small fixes have not yet been released but are available from the php7 default branch.

bd808 avatar Nov 06 '23 17:11 bd808

Thanks! I would not have checked the php7 branch for this… 🙈 Great to hear – and "small fixes" sounds like nothing that would block a release around the time PHP 8.3 is released as stable. 🎉

kdambekalns avatar Nov 07 '23 06:11 kdambekalns

When would such a release be available? We have php 8.3 out for a long time now.

Anankke avatar Jun 15 '24 09:06 Anankke

Folks, I have a problem... I'd like to install php yaml extension on Fedora 40 using pecl (php-pecl-yaml rpm package is no longer available on F40), but...

# pecl install yaml
.
.
.
/var/tmp/yaml/parse.c: In function 'handle_sequence':
/var/tmp/yaml/parse.c:534:39: error: passing argument 1 of 'zval_ptr_dtor' from incompatible pointer type [-Wincompatible-pointer-types]
  534 |                         zval_ptr_dtor(&retval);
      |                                       ^~~~~~~
      |                                       |
      |                                       zval ** {aka struct _zval_struct **}
In file included from /usr/include/php/Zend/zend.h:36,
                 from /usr/include/php/main/php.h:31,
                 from /var/tmp/yaml/php_yaml.h:46,
                 from /var/tmp/yaml/parse.c:36:
/usr/include/php/Zend/zend_variables.h:79:35: note: expected 'zval *' {aka 'struct _zval_struct *'} but argument is of type 'zval **' {aka 'struct _zval_struct **'}
   79 | ZEND_API void zval_ptr_dtor(zval *zval_ptr);
      |                             ~~~~~~^~~~~~~~
make: *** [Makefile:214: parse.lo] Error 1
ERROR: `make' failed

caringi avatar Aug 29 '24 14:08 caringi