]> granicus.if.org Git - php/commitdiff
Fixed some annoying warnings
authorXinchen Hui <laruence@php.net>
Tue, 27 Jan 2015 15:28:31 +0000 (23:28 +0800)
committerXinchen Hui <laruence@php.net>
Tue, 27 Jan 2015 15:28:31 +0000 (23:28 +0800)
ext/opcache/zend_accelerator_module.c
main/main.c

index 7997deaa951d88bc84c962b7342d5b040fe36312..625fe65d4e155aa6f5743904c3ee474ad5eadd11 100644 (file)
@@ -282,7 +282,7 @@ static int filename_is_in_cache(char *filename, int filename_len)
 {
        char *key;
        int key_length;
-       zend_file_handle handle = {0};
+       zend_file_handle handle = {{0}, NULL, NULL, 0, 0};
        zend_persistent_script *persistent_script;
 
        handle.filename = filename;
index 3aef805580045dc9ed5b14061ff17ae162196487..538e8fe7d2831fecd6d7dca177e1dee78fd6604e 100644 (file)
@@ -761,7 +761,7 @@ PHPAPI void php_verror(const char *docref, const char *params, int type, const c
        buffer_len = (int)vspprintf(&buffer, 0, format, args);
 
        if (PG(html_errors)) {
-               replace_buffer = php_escape_html_entities(buffer, buffer_len, 0, ENT_COMPAT, NULL);
+               replace_buffer = php_escape_html_entities((unsigned char*)buffer, buffer_len, 0, ENT_COMPAT, NULL);
                efree(buffer);
                buffer = replace_buffer->val;
                buffer_len = (int)replace_buffer->len;
@@ -820,7 +820,7 @@ PHPAPI void php_verror(const char *docref, const char *params, int type, const c
        }
 
        if (PG(html_errors)) {
-               replace_origin = php_escape_html_entities(origin, origin_len, 0, ENT_COMPAT, NULL);
+               replace_origin = php_escape_html_entities((unsigned char*)origin, origin_len, 0, ENT_COMPAT, NULL);
                efree(origin);
                origin = replace_origin->val;
        }
@@ -1136,7 +1136,7 @@ static void php_error_cb(int type, const char *error_filename, const uint error_
 
                                if (PG(html_errors)) {
                                        if (type == E_ERROR || type == E_PARSE) {
-                                               zend_string *buf = php_escape_html_entities(buffer, buffer_len, 0, ENT_COMPAT, NULL);
+                                               zend_string *buf = php_escape_html_entities((unsigned char*)buffer, buffer_len, 0, ENT_COMPAT, NULL);
                                                php_printf("%s<br />\n<b>%s</b>:  %s in <b>%s</b> on line <b>%d</b><br />\n%s", STR_PRINT(prepend_string), error_type_str, buf->val, error_filename, error_lineno, STR_PRINT(append_string));
                                                zend_string_free(buf);
                                        } else {
@@ -2472,7 +2472,7 @@ void php_module_shutdown(void)
 PHPAPI int php_execute_script(zend_file_handle *primary_file)
 {
        zend_file_handle *prepend_file_p, *append_file_p;
-       zend_file_handle prepend_file = {0}, append_file = {0};
+       zend_file_handle prepend_file = {{0}, NULL, NULL, 0, 0}, append_file = {{0}, NULL, NULL, 0, 0};
 #if HAVE_BROKEN_GETCWD
        volatile int old_cwd_fd = -1;
 #else
@@ -2631,7 +2631,7 @@ PHPAPI int php_handle_auth_data(const char *auth)
                char *pass;
                zend_string *user;
 
-               user = php_base64_decode(auth + 6, strlen(auth) - 6);
+               user = php_base64_decode((const unsigned char*)auth + 6, strlen(auth) - 6);
                if (user) {
                        pass = strchr(user->val, ':');
                        if (pass) {