]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fixed broken unit tests in other parts of the project.
authorGrzegorz Antoniak <ga@anadoxin.org>
Thu, 4 Oct 2018 05:01:51 +0000 (07:01 +0200)
committerGrzegorz Antoniak <ga@anadoxin.org>
Thu, 4 Oct 2018 05:01:51 +0000 (07:01 +0200)
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.

libarchive/archive_read_support_format_rar5.c

index 415f5bdfdd4dd6797cb2bade502ddc7c5e4b74b4..4b770d77ec83320176dd2b6092d79a4b69ea4649 100644 (file)
@@ -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) {