From: Steph Fox Date: Sat, 1 Mar 2008 21:31:03 +0000 (+0000) Subject: All tests pass here now. Thanks Philip for reporting compiler errors that don't show... X-Git-Tag: RELEASE_2_0_0a1~282 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=15fefd3692148fb08c3e7733bfffdf6a3a624bf2;p=php All tests pass here now. Thanks Philip for reporting compiler errors that don't show on my setup. --- diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 59229c98d9..d50cd92ec2 100755 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -1601,7 +1601,6 @@ static void phar_convert_to_other(phar_archive_data *source, int convert, char * { phar_archive_data phar = {0}; char *error; - int is_data; phar_entry_info *entry, newentry; /* set whole-archive compression and type from parameter */ @@ -1749,7 +1748,7 @@ static void phar_convert_to_other(phar_archive_data *source, int convert, char * */ PHP_METHOD(Phar, convertToTar) { - char *error, *ext = NULL; + char *ext = NULL; php_uint32 flags; long method = 0; int ext_len = 0; @@ -1813,7 +1812,7 @@ PHP_METHOD(Phar, convertToTar) */ PHP_METHOD(Phar, convertToZip) { - char *error, *ext = NULL; + char *ext = NULL; int ext_len = 0; PHAR_ARCHIVE_OBJECT(); @@ -1859,7 +1858,7 @@ PHP_METHOD(Phar, convertToZip) */ PHP_METHOD(Phar, convertToPhar) { - char *error, *ext = NULL; + char *ext = NULL; php_uint32 flags; long method = 0; int ext_len = 0; diff --git a/ext/phar/util.c b/ext/phar/util.c index be27755832..304f0c115e 100644 --- a/ext/phar/util.c +++ b/ext/phar/util.c @@ -642,10 +642,9 @@ int phar_create_writeable_entry(phar_archive_data *phar, phar_entry_info *entry, } else if (php_stream_is(*(php_stream**)entry->fp->abstract, PHP_STREAM_IS_STDIO)) { php_stream_truncate_set_size(*(php_stream**)entry->fp->abstract, 0); } else { - efree(*ret); *ret = NULL; if (error) { - spprintf(error, 0, "phar error: file \"%s\" cannot be opened for writing, no truncate support", fname); + spprintf(error, 0, "phar error: file \"%s\" cannot be opened for writing, no truncate support", phar->fname); } return FAILURE; } @@ -926,7 +925,7 @@ phar_entry_info *phar_get_entry_info_dir(phar_archive_data *phar, char *path, in if (HASH_KEY_NON_EXISTANT == zend_hash_get_current_key_ex(&phar->mounted_dirs, &key, &keylen, &unused, 0, NULL)) { break; } - if (keylen >= path_len || strncmp(key, path, keylen)) { + if ((int)keylen >= path_len || strncmp(key, path, keylen)) { continue; } else { char *test;