diff options
author | Kalle Sommer Nielsen <kalle@php.net> | 2017-08-24 02:31:52 +0200 |
---|---|---|
committer | Kalle Sommer Nielsen <kalle@php.net> | 2017-08-24 02:31:52 +0200 |
commit | cf1d42e0015108323365f5253b0cbe4e1fbc3eea (patch) | |
tree | bbe03ea8d49ba25352d8f22d03dfea0f51f3dfe5 | |
parent | 4fbff82c1079f2c48c769c94f0d9269be7508a59 (diff) | |
download | php-git-cf1d42e0015108323365f5253b0cbe4e1fbc3eea.tar.gz |
Kill compiler warnings in ext/phar
-rw-r--r-- | ext/phar/phar.c | 8 | ||||
-rw-r--r-- | ext/phar/phar_object.c | 2 | ||||
-rw-r--r-- | ext/phar/zip.c | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/ext/phar/phar.c b/ext/phar/phar.c index 5ff239f17f..34ba5c692a 100644 --- a/ext/phar/phar.c +++ b/ext/phar/phar.c @@ -2202,9 +2202,9 @@ int phar_split_fname(const char *filename, int filename_len, char **arch, int *a ext_len = 0; #ifdef PHP_WIN32 - save = filename; + save = (char *)filename; filename = estrndup(filename, filename_len); - phar_unixify_path_separators(filename, filename_len); + phar_unixify_path_separators((char *)filename, filename_len); #endif if (phar_detect_phar_fname_ext(filename, filename_len, &ext_str, &ext_len, executable, for_create, 0) == FAILURE) { if (ext_len != -1) { @@ -2218,7 +2218,7 @@ int phar_split_fname(const char *filename, int filename_len, char **arch, int *a } #ifdef PHP_WIN32 - efree(filename); + efree((char *)filename); #endif return FAILURE; } @@ -2243,7 +2243,7 @@ int phar_split_fname(const char *filename, int filename_len, char **arch, int *a } #ifdef PHP_WIN32 - efree(filename); + efree((char *)filename); #endif return SUCCESS; diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index af4ccba314..46423246dd 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -67,7 +67,7 @@ static void phar_mung_server_vars(char *fname, char *entry, int entry_len, char if (NULL != (stuff = zend_hash_str_find(_SERVER, "PATH_INFO", sizeof("PATH_INFO")-1))) { path_info = Z_STRVAL_P(stuff); code = Z_STRLEN_P(stuff); - if (code > entry_len && !memcmp(path_info, entry, entry_len)) { + if (code > (size_t)entry_len && !memcmp(path_info, entry, entry_len)) { ZVAL_STR(&temp, Z_STR_P(stuff)); ZVAL_STRINGL(stuff, path_info + entry_len, request_uri_len); zend_hash_str_update(_SERVER, "PHAR_PATH_INFO", sizeof("PHAR_PATH_INFO")-1, &temp); diff --git a/ext/phar/zip.c b/ext/phar/zip.c index 08417bc07b..573de4f25d 100644 --- a/ext/phar/zip.c +++ b/ext/phar/zip.c @@ -167,7 +167,7 @@ int phar_parse_zipfile(php_stream *fp, char *fname, int fname_len, char *alias, { phar_zip_dir_end locator; char buf[sizeof(locator) + 65536]; - size_t size; + zend_off_t size; uint16_t i; phar_archive_data *mydata = NULL; phar_entry_info entry = {0}; @@ -199,7 +199,7 @@ int phar_parse_zipfile(php_stream *fp, char *fname, int fname_len, char *alias, } while ((p=(char *) memchr(p + 1, 'P', (size_t) (size - (p + 1 - buf)))) != NULL) { - if ((p - buf) + sizeof(locator) <= size && !memcmp(p + 1, "K\5\6", 3)) { + if ((p - buf) + sizeof(locator) <= (size_t)size && !memcmp(p + 1, "K\5\6", 3)) { memcpy((void *)&locator, (void *) p, sizeof(locator)); if (PHAR_GET_16(locator.centraldisk) != 0 || PHAR_GET_16(locator.disknumber) != 0) { /* split archives not handled */ |