From: Colin Percival Date: Sun, 21 Jun 2009 05:09:55 +0000 (-0400) Subject: Clear any warning/error messages set by archive_read_support_compression_* X-Git-Tag: v2.8.0~575 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a27efea720ea4db34b0ad0c1c298349fef32f8b;p=thirdparty%2Flibarchive.git Clear any warning/error messages set by archive_read_support_compression_* functions, since we're ignoring their return codes. This eliminates the weird behaviour of printing "Using external unxz program for xz decompression" if an unrelated error occurs when opening an archive (due to the message lingering in the error message buffer). Approved by: kientzle SVN-Revision: 1176 --- diff --git a/libarchive/archive_read_support_compression_all.c b/libarchive/archive_read_support_compression_all.c index 063c28897..dcd6a31ca 100644 --- a/libarchive/archive_read_support_compression_all.c +++ b/libarchive/archive_read_support_compression_all.c @@ -50,5 +50,7 @@ archive_read_support_compression_all(struct archive *a) * "as much as possible." Clients who need specific * compression should enable those individually so they can * verify the level of support. */ + /* Clear any warning messages set by the above functions. */ + archive_clear_error(a); return (ARCHIVE_OK); }