Bug #54712 [Bgs]: zend API should use const char * where appropriate
| From: | felipe@php.net | Date: | Wed, 11 May 2011 22:23:01 +0000 |
| Subject: | Bug #54712 [Bgs]: zend API should use const char * where appropriate | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-160687@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=54712&edit=1
ID: 54712
Updated by: felipe@php.net
Reported by: chantry dot xavier at gmail dot com
Summary: zend API should use const char * where appropriate
Status: Bogus
Type: Bug
Package: Compile Warning
Operating System: linux
PHP Version: 5.3.6
Block user comment: N
Private report: N
New Comment:
BTW in trunk we already have 'const char *type_spec'.
Previous Comments:
------------------------------------------------------------------------
[2011-05-11 23:30:29] johannes@php.net
If you can provide patches they will most likely be added. We improve
this step by step but with low priority compared to other issues. As
this is an already ongoing effort this bug is not needed.
(also mind: even though it's trivial we can change these published apis
only in trunk, not released versions)
------------------------------------------------------------------------
[2011-05-11 19:47:32] chantry dot xavier at gmail dot com
Description:
------------
All zend API functions should use const char * for strings.
Trying to build a C program using Zend with clang results in hundreds of
warnings such as these :
foo.c:4975:5: warning: passing 'const char [7]' to parameter of type
'char *'
discards qualifiers
PARSE_PARAMETERS("rrlszz", &zbody, &zurl, &nb_fields, &line,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.c:4975:22: note: instantiated from:
PARSE_PARAMETERS("rrlszz", &zbody, &zurl, &nb_fields, &line,
^~~~~~~~
/usr/include/php5/Zend/zend_API.h:238:66: note: passing argument to
parameter
'type_spec' here
ZEND_API int zend_parse_parameters(int num_args TSRMLS_DC, char
*type_spec,
...);
^
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=54712&edit=1