From: Michihiro NAKAJIMA Date: Fri, 17 Feb 2012 05:59:54 +0000 (+0900) Subject: Fix remaining build failure in agressive warnings. X-Git-Tag: v3.0.4~2^2~81 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ad32f523b4517ca0b3c17510df451e1f90bead4;p=thirdparty%2Flibarchive.git Fix remaining build failure in agressive warnings. --- diff --git a/libarchive/archive_read_support_format_7zip.c b/libarchive/archive_read_support_format_7zip.c index 316ad990e..6281f93c6 100644 --- a/libarchive/archive_read_support_format_7zip.c +++ b/libarchive/archive_read_support_format_7zip.c @@ -1505,6 +1505,10 @@ free_decompression(struct archive_read *a, struct _7zip *zip) { int r = ARCHIVE_OK; +#if !defined(HAVE_ZLIB_H) &&\ + !(defined(HAVE_BZLIB_H) && defined(BZ_CONFIG_ERROR)) + (void)a;/* UNUSED */ +#endif #ifdef HAVE_LZMA_H if (zip->lzstream_valid) lzma_end(&(zip->lzstream)); diff --git a/libarchive/archive_write_disk_posix.c b/libarchive/archive_write_disk_posix.c index 37935ad58..715c418e8 100644 --- a/libarchive/archive_write_disk_posix.c +++ b/libarchive/archive_write_disk_posix.c @@ -2529,7 +2529,7 @@ set_mac_metadata(struct archive_write_disk *a, const char *pathname, } written = write(fd, metadata, metadata_size); close(fd); - if (written != metadata_size + if ((size_t)written != metadata_size || copyfile(tmp.s, pathname, 0, COPYFILE_UNPACK | COPYFILE_NOFOLLOW | COPYFILE_ACL | COPYFILE_XATTR)) {