fix datatype mismatch warnings

This commit is contained in:
Anatol Belski 2014-10-24 20:57:38 +02:00
parent 89ed34e3e9
commit 1b4fd5825a
3 changed files with 8 additions and 8 deletions

View file

@ -266,7 +266,7 @@ ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC)
}
ZEND_API int zend_print_variable(zval *var TSRMLS_DC)
ZEND_API size_t zend_print_variable(zval *var TSRMLS_DC)
{
return zend_print_zval(var, 0 TSRMLS_CC);
}

View file

@ -93,7 +93,7 @@ static zend_always_inline void _zval_opt_copy_ctor_no_imm(zval *zvalue ZEND_FILE
ZEND_API int zval_copy_static_var(zval *p TSRMLS_DC, int num_args, va_list args, zend_hash_key *key);
ZEND_API int zend_print_variable(zval *var TSRMLS_DC);
ZEND_API size_t zend_print_variable(zval *var TSRMLS_DC);
ZEND_API void _zval_ptr_dtor(zval *zval_ptr ZEND_FILE_LINE_DC);
ZEND_API void _zval_internal_dtor_for_ptr(zval *zvalue ZEND_FILE_LINE_DC);
ZEND_API void _zval_internal_dtor(zval *zvalue ZEND_FILE_LINE_DC);

View file

@ -380,7 +380,7 @@ CWD_API int php_sys_stat_ex(const char *path, zend_stat_t *buf, int lstat) /* {{
}
if ((data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) {
int len = strlen(path);
size_t len = strlen(path);
if (path[len-4] == '.') {
if (_memicmp(path+len-3, "exe", 3) == 0 ||
@ -467,7 +467,7 @@ CWD_API void virtual_cwd_startup(void) /* {{{ */
cwd[0] = '\0';
}
main_cwd_state.cwd_length = strlen(cwd);
main_cwd_state.cwd_length = (int)strlen(cwd);
#ifdef TSRM_WIN32
if (main_cwd_state.cwd_length >= 2 && cwd[1] == ':') {
cwd[0] = toupper(cwd[0]);
@ -1146,7 +1146,7 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
return -1;
}
if (save) {
i = strlen(data.cFileName);
i = (int)strlen(data.cFileName);
memcpy(path+j, data.cFileName, i+1);
j += i;
} else {
@ -1180,7 +1180,7 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
/* returns 0 for ok, 1 for error */
CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path, int use_realpath TSRMLS_DC) /* {{{ */
{
int path_length = strlen(path);
int path_length = (int)strlen(path);
char resolved_path[MAXPATHLEN];
int start = 1;
int ll = 0;
@ -1394,7 +1394,7 @@ CWD_API int virtual_chdir(const char *path TSRMLS_DC) /* {{{ */
CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path TSRMLS_DC) TSRMLS_DC) /* {{{ */
{
int length = strlen(path);
size_t length = strlen(path);
char *temp;
int retval;
ALLOCA_FLAG(use_heap)
@ -1972,7 +1972,7 @@ CWD_API char *tsrm_realpath(const char *path, char *real_path TSRMLS_DC) /* {{{
} else if (!IS_ABSOLUTE_PATH(path, strlen(path)) &&
VCWD_GETCWD(cwd, MAXPATHLEN)) {
new_state.cwd = estrdup(cwd);
new_state.cwd_length = strlen(cwd);
new_state.cwd_length = (int)strlen(cwd);
} else {
new_state.cwd = (char*)emalloc(1);
if (new_state.cwd == NULL) {