PHP 8.3: Warning about passing argument 1 of 'zval_ptr_dtor' from incompatible pointer type
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);
| ~~~~~~^~~~~~~~
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.
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. 🎉
When would such a release be available? We have php 8.3 out for a long time now.
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