From: Dmitry Stogov Date: Thu, 14 Aug 2014 19:53:27 +0000 (+0400) Subject: Fixed compilation warnings X-Git-Tag: POST_PHPNG_MERGE~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c78a1734c284fcd6805f6c8952c44a4b4887bd61;p=php Fixed compilation warnings --- diff --git a/Zend/zend.c b/Zend/zend.c old mode 100644 new mode 100755 index 652021a6d5..913462bec7 --- 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 6232b8e2f1..c3a02d53a3 --- 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 08251dfa5e..49056cfad4 --- 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 09c567dfa2..921d71b685 --- 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 4053b72499..6228c827c9 --- 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 012592381b..19573d8e42 --- 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 26260412e5..1fd314b582 --- 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