com php-src: Fixed compilation warnings: Zend/zend.c Zend/zend_ini.c Zend/zend_multibyte.c Zend/zend_o perators.c ext/opcache/ZendAccelerator.c
ext/standard/d l.c main/main.c
| From: | Dmitry Stogov | Date: | Thu, 14 Aug 2014 19:53:27 +0000 |
| Subject: | com php-src: Fixed compilation warnings: Zend/zend.c Zend/zend_ini.c Zend/zend_multibyte.c Zend/zend_o perators.c ext/opcache/ZendAccelerator.c ext/standard/d l.c main/main.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-79872@lists.php.net to get a copy of this message | ||
Commit: c78a1734c284fcd6805f6c8952c44a4b4887bd61
Author: Dmitry Stogov <dmitry@zend.com> Thu, 14 Aug 2014 23:53:27 +0400
Parents: 243383a811c2ff8ce138ba3715cafbd907eba1de
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c78a1734c284fcd6805f6c8952c44a4b4887bd61
Log:
Fixed compilation warnings
Changed paths:
M Zend/zend.c
M Zend/zend_ini.c
M Zend/zend_multibyte..c
M Zend/zend_operators.c
M ext/opcache/ZendAccelerator.c
M ext/standard/dl.c
M main/main.c
Diff:
diff --git a/Zend/zend.c b/Zend/zend.c
old mode 100644
new mode 100755
index 652021a..913462b
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -537,7 +537,7 @@ static void compiler_globals_dtor(zend_compiler_globals *compiler_globals TSRMLS
free(compiler_globals->static_members_table);
}
if (compiler_globals->script_encoding_list) {
- pefree(compiler_globals->script_encoding_list, 1);
+ pefree((char*)compiler_globals->script_encoding_list, 1);
}
compiler_globals->last_static_member = 0;
}
diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c
old mode 100644
new mode 100755
index 6232b8e..c3a02d5
--- a/Zend/zend_ini.c
+++ b/Zend/zend_ini.c
@@ -231,9 +231,11 @@ ZEND_API void zend_unregister_ini_entries(int module_number TSRMLS_DC) /* {{{
*/
/* }}} */
#ifdef ZTS
-static int zend_ini_refresh_cache(zval *el, int stage TSRMLS_DC) /* {{{ */
+static int zend_ini_refresh_cache(zval *el, void *arg TSRMLS_DC) /* {{{ */
{
zend_ini_entry *p = (zend_ini_entry *)Z_PTR_P(el);
+ int stage = (int)(zend_intptr_t)arg;
+
if (p->on_modify) {
p->on_modify(p, p->value, p->value_length, p->mh_arg1, p->mh_arg2, p->mh_arg3,
stage TSRMLS_CC);
}
diff --git a/Zend/zend_multibyte.c b/Zend/zend_multibyte.c
old mode 100644
new mode 100755
index 08251df..49056cf
--- a/Zend/zend_multibyte.c
+++ b/Zend/zend_multibyte.c
@@ -168,7 +168,7 @@ ZEND_API const zend_encoding *zend_multibyte_get_script_encoding(TSRMLS_D)
ZEND_API int zend_multibyte_set_script_encoding(const zend_encoding **encoding_list, size_t
encoding_list_size TSRMLS_DC)
{
if (CG(script_encoding_list)) {
- free(CG(script_encoding_list));
+ free((char*)CG(script_encoding_list));
}
CG(script_encoding_list) = encoding_list;
CG(script_encoding_list_size) = encoding_list_size;
@@ -195,7 +195,7 @@ ZEND_API int zend_multibyte_set_script_encoding_by_string(const char *new_value,
}
if (size == 0) {
- pefree(list, 1);
+ pefree((void*)list, 1);
return FAILURE;
}
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
old mode 100644
new mode 100755
index 09c567d..921d71b
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -819,6 +819,7 @@ try_again:
goto try_again;
EMPTY_SWITCH_DEFAULT_CASE()
}
+ return 0;
}
/* }}} */
@@ -859,6 +860,7 @@ try_again:
goto try_again;
EMPTY_SWITCH_DEFAULT_CASE()
}
+ return 0.0;
}
/* }}} */
@@ -912,6 +914,7 @@ try_again:
goto try_again;
EMPTY_SWITCH_DEFAULT_CASE()
}
+ return NULL;
}
/* }}} */
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
old mode 100644
new mode 100755
index 4053b72..6228c82
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -719,7 +719,7 @@ static accel_time_t zend_get_file_handle_timestamp_win(zend_file_handle *file_ha
ftime /= 10000000L;
if (size) {
- *size = (size_t)(((unsigned __int64)fdata.nFileSizeHigh) << 32 + (unsigned
__int64)fdata.nFileSizeLow);
+ *size = (size_t)((((unsigned __int64)fdata.nFileSizeHigh) << 32) + (unsigned
__int64)fdata.nFileSizeLow);
}
return (accel_time_t)ftime;
}
diff --git a/ext/standard/dl.c b/ext/standard/dl.c
old mode 100644
new mode 100755
index 0125923..19573d8
--- a/ext/standard/dl.c
+++ b/ext/standard/dl.c
@@ -145,7 +145,7 @@ PHPAPI int php_load_extension(char *filename, int type, int start_now TSRMLS_DC)
if (!handle) {
#if PHP_WIN32
char *err = GET_DL_ERROR();
- if (err && (*err != "")) {
+ if (err && (*err != '\0')) {
php_error_docref(NULL TSRMLS_CC, error_type, "Unable to load dynamic library '%s'
- %s", libpath, err);
LocalFree(err);
} else {
diff --git a/main/main.c b/main/main.c
old mode 100644
new mode 100755
index 2626041..1fd314b
--- a/main/main.c
+++ b/main/main.c
@@ -2503,7 +2503,7 @@ PHPAPI int php_execute_script(zend_file_handle *primary_file TSRMLS_DC)
#ifdef PHP_WIN32
if(primary_file->filename) {
- UpdateIniFromRegistry(primary_file->filename TSRMLS_CC);
+ UpdateIniFromRegistry((char*)primary_file->filename TSRMLS_CC);
}
#endif
@@ -2595,7 +2595,7 @@ PHPAPI int php_execute_simple_script(zend_file_handle *primary_file, zval *ret
T
zend_try {
#ifdef PHP_WIN32
if(primary_file->filename) {
- UpdateIniFromRegistry(primary_file->filename TSRMLS_CC);
+ UpdateIniFromRegistry((char*)primary_file->filename TSRMLS_CC);
}
#endif