]> granicus.if.org Git - php/commitdiff
Fixed compilation warnings
authorDmitry Stogov <dmitry@zend.com>
Thu, 14 Aug 2014 19:53:27 +0000 (23:53 +0400)
committerDmitry Stogov <dmitry@zend.com>
Thu, 14 Aug 2014 19:53:27 +0000 (23:53 +0400)
Zend/zend.c [changed mode: 0644->0755]
Zend/zend_ini.c [changed mode: 0644->0755]
Zend/zend_multibyte.c [changed mode: 0644->0755]
Zend/zend_operators.c [changed mode: 0644->0755]
ext/opcache/ZendAccelerator.c [changed mode: 0644->0755]
ext/standard/dl.c [changed mode: 0644->0755]
main/main.c [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 652021a..913462b
@@ -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;
 }
old mode 100644 (file)
new mode 100755 (executable)
index 6232b8e..c3a02d5
@@ -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);
        }
old mode 100644 (file)
new mode 100755 (executable)
index 08251df..49056cf
@@ -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;
        }
 
old mode 100644 (file)
new mode 100755 (executable)
index 09c567d..921d71b
@@ -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;
 }
 /* }}} */
 
old mode 100644 (file)
new mode 100755 (executable)
index 4053b72..6228c82
@@ -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;
        }
old mode 100644 (file)
new mode 100755 (executable)
index 0125923..19573d8
@@ -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 {
old mode 100644 (file)
new mode 100755 (executable)
index 2626041..1fd314b
@@ -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