]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Clear any warning/error messages set by archive_read_support_compression_*
authorColin Percival <cperciva@daemonology.net>
Sun, 21 Jun 2009 05:09:55 +0000 (01:09 -0400)
committerColin Percival <cperciva@daemonology.net>
Sun, 21 Jun 2009 05:09:55 +0000 (01:09 -0400)
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

libarchive/archive_read_support_compression_all.c

index 063c2889784c0cfec3530105d7ca8545d756fe19..dcd6a31ca9a8b498c32a73284b91bb6c683b5d0c 100644 (file)
@@ -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);
 }