From 5a93e55ef0d84cfa0e1969f7ec398dca50c39fde Mon Sep 17 00:00:00 2001 From: Grzegorz Antoniak Date: Fri, 27 Sep 2019 07:48:21 +0200 Subject: [PATCH] RAR5 reader: remove compilation warnings ('uninitialized variable') This commit makes the compiler happy by removing some uninitialized variable warnings/errors in RAR5 reader. --- libarchive/archive_read_support_format_rar5.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libarchive/archive_read_support_format_rar5.c b/libarchive/archive_read_support_format_rar5.c index e58cbbf6d..cfdc2d887 100644 --- a/libarchive/archive_read_support_format_rar5.c +++ b/libarchive/archive_read_support_format_rar5.c @@ -1177,7 +1177,7 @@ static int process_main_locator_extra_block(struct archive_read* a, static int parse_file_extra_hash(struct archive_read* a, struct rar5* rar, ssize_t* extra_data_size) { - size_t hash_type; + size_t hash_type = 0; size_t value_len; if(!read_var_sized(a, &hash_type, &value_len)) @@ -1303,7 +1303,7 @@ static int parse_file_extra_htime(struct archive_read* a, struct archive_entry* e, struct rar5* rar, ssize_t* extra_data_size) { char unix_time = 0; - size_t flags; + size_t flags = 0; size_t value_len; enum HTIME_FLAGS { -- 2.47.2