com php-src: Fixed some annoying warnings: ext/opcache/zend_a ccelerator_module.c main/main.c
| From: | Xinchen Hui | Date: | Tue, 27 Jan 2015 15:28:31 +0000 |
| Subject: | com php-src: Fixed some annoying warnings: ext/opcache/zend_a ccelerator_module.c main/main.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-84418@lists.php.net to get a copy of this message | ||
Commit: 1828ec21e29e90d9e84baf8ff4dc10ba83c6d0d2
Author: Xinchen Hui <laruence@php.net> Tue, 27 Jan 2015 23:28:31 +0800
Parents: 95142d901568963b3f9d0cf0d9782021bd83f35f
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1828ec21e29e90d9e84baf8ff4dc10ba83c6d0d2
Log:
Fixed some annoying warnings
Changed paths:
M ext/opcache/zend_accelerator_module.c
M main/main.c
Diff:
diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c
index 7997dea..625fe65 100644
--- a/ext/opcache/zend_accelerator_module.c
+++ b/ext/opcache/zend_accelerator_module.c
@@ -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;
diff --git a/main/main.c b/main/main.c
index 3aef805..538e8fe 100644
--- a/main/main.c
+++ b/main/main.c
@@ -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) {