From: Grzegorz Antoniak Date: Thu, 4 Oct 2018 05:01:51 +0000 (+0200) Subject: Fixed broken unit tests in other parts of the project. X-Git-Tag: v3.4.0~175^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=637d2148fe83967c8016d3455e55c4bb1ca69628;p=thirdparty%2Flibarchive.git Fixed broken unit tests in other parts of the project. The problem was a bad return value for the set_option() function. This commit changes this return value to ARCHIVE_WARN, as there currently are no options to be handled by the decompressor. --- diff --git a/libarchive/archive_read_support_format_rar5.c b/libarchive/archive_read_support_format_rar5.c index 415f5bdfd..4b770d77e 100644 --- a/libarchive/archive_read_support_format_rar5.c +++ b/libarchive/archive_read_support_format_rar5.c @@ -1038,14 +1038,16 @@ static int rar5_bid(struct archive_read* a, int best_bid) { return -1; } -static int rar5_options(struct archive_read *a, const char *key, - const char *val) -{ +static int rar5_options(struct archive_read *a, const char *key, const char *val) { (void) a; (void) key; (void) val; - return ARCHIVE_FATAL; + /* No options supported in this version. Return the ARCHIVE_WARN code to + * signal the options supervisor that the unpacker didn't handle setting + * this option. */ + + return ARCHIVE_WARN; } static void init_header(struct archive_read* a) {