Skip to content

[BUG]: [-Wincompatible-pointer-types] build warning [5.0.0alpha7] #15792

Open
@remicollet

Description

@remicollet

In various place:

In file included from /usr/include/php/Zend/zend_types.h:25,
                 from /usr/include/php/Zend/zend.h:27,
                 from /usr/include/php/main/php.h:31,
                 from /builddir/build/BUILD/php-phalcon5-5.0.0~alpha7/NTS/phalcon.zep.c:46:
/builddir/build/BUILD/php-phalcon5-5.0.0~alpha7/NTS/phalcon.zep.c: In function 'zim_Phalcon_Cache_Cache_checkKey':
/usr/include/php/Zend/zend_API.h:1775:44: warning: passing argument 2 of 'zend_parse_arg_str' from incompatible pointer type [-Wincompatible-pointer-types]
   if (UNEXPECTED(!zend_parse_arg_str(_arg, &dest, check_null))) { \
/usr/include/php/Zend/zend_portability.h:325:52: note: in definition of macro 'UNEXPECTED'
 # define UNEXPECTED(condition) __builtin_expect(!!(condition), 0)
                                                    ^~~~~~~~~
/usr/include/php/Zend/zend_API.h:1782:2: note: in expansion of macro 'Z_PARAM_STR_EX2'
  Z_PARAM_STR_EX2(dest, check_null, separate, separate)
  ^~~~~~~~~~~~~~~
/usr/include/php/Zend/zend_API.h:1785:2: note: in expansion of macro 'Z_PARAM_STR_EX'
  Z_PARAM_STR_EX(dest, 0, 0)
  ^~~~~~~~~~~~~~
/builddir/build/BUILD/php-phalcon5-5.0.0~alpha7/NTS/phalcon.zep.c:221588:3: note: in expansion of macro 'Z_PARAM_STR'
   Z_PARAM_STR(key)
   ^~~~~~~~~~~
In file included from /usr/include/php/main/php.h:35,
                 from /builddir/build/BUILD/php-phalcon5-5.0.0~alpha7/NTS/phalcon.zep.c:46:
/usr/include/php/Zend/zend_API.h:1947:76: note: expected 'zend_string **' {aka 'struct _zend_string **'} but argument is of type 'zval *' {aka 'struct _zval_struct *'}

In code we have

	zval key;
        ...
		Z_PARAM_STR(key)

So key should be a zend_string.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions