Edit report at http://bugs.php.net/bug.php?id=54712&edit=1

 ID:                 54712
 Updated by:         [email protected]
 Reported by:        chantry dot xavier at gmail dot com
 Summary:            zend API should use const char * where appropriate
-Status:             Open
+Status:             Bogus
 Type:               Bug
 Package:            Compile Warning
 Operating System:   linux
 PHP Version:        5.3.6
 Block user comment: N
 Private report:     N

 New Comment:

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)


Previous Comments:
------------------------------------------------------------------------
[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

Reply via email to