diff --git a/lib/libarchive/archive_read_support_compression_bzip2.c b/lib/libarchive/archive_read_support_compression_bzip2.c index 693bdd63b707..e72e1c5adc88 100644 --- a/lib/libarchive/archive_read_support_compression_bzip2.c +++ b/lib/libarchive/archive_read_support_compression_bzip2.c @@ -210,12 +210,11 @@ static ssize_t bzip2_filter_read(struct archive_read_filter *self, const void **p) { struct private_data *state; - size_t read_avail, decompressed; + size_t decompressed; const char *read_buf; ssize_t ret; state = (struct private_data *)self->data; - read_avail = 0; if (state->eof) { *p = NULL; @@ -348,7 +347,7 @@ bzip2_filter_close(struct archive_read_filter *self) free(state->out_block); free(state); - return (ARCHIVE_OK); + return (ret); } #endif /* HAVE_BZLIB_H */ diff --git a/lib/libarchive/archive_write_set_compression_xz.c b/lib/libarchive/archive_write_set_compression_xz.c index 8396252527cf..81733170b6a3 100644 --- a/lib/libarchive/archive_write_set_compression_xz.c +++ b/lib/libarchive/archive_write_set_compression_xz.c @@ -323,7 +323,6 @@ archive_compressor_xz_finish(struct archive_write *a) block_length = state->stream.next_out - state->compressed; /* Tricky calculation to determine size of last block. */ - target_block_length = block_length; if (a->bytes_in_last_block <= 0) /* Default or Zero: pad to full block */ target_block_length = a->bytes_per_block; diff --git a/lib/libarchive/archive_write_set_format_ar.c b/lib/libarchive/archive_write_set_format_ar.c index f9dd546592f2..bffe07cba8f5 100644 --- a/lib/libarchive/archive_write_set_format_ar.c +++ b/lib/libarchive/archive_write_set_format_ar.c @@ -145,7 +145,6 @@ archive_write_ar_header(struct archive_write *a, struct archive_entry *entry) const char *filename; int64_t size; - ret = 0; append_fn = 0; ar = (struct ar_w *)a->format_data; ar->is_strtab = 0;