From: Dongwoo Lee Date: Mon, 25 Sep 2017 08:21:35 +0000 (+0900) Subject: Fix use of deprecated libarchive function calls X-Git-Tag: submit/trunk/20190927.044709~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9ab5f26254cb3c3f308786892701d3fd8fb79c64;p=tools%2Flthor.git Fix use of deprecated libarchive function calls To get rid of build warning about deprecated funcations of libarchive, this patch replaces those function calls with alternative ones. Change-Id: I164c60243e20fcbbdad2185a14534fe7a4daf9d8 Signed-off-by: Dongwoo Lee --- diff --git a/libthor/thor_tar.c b/libthor/thor_tar.c index 0f6fb10..f7bb78b 100644 --- a/libthor/thor_tar.c +++ b/libthor/thor_tar.c @@ -102,7 +102,7 @@ static void tar_release(struct thor_data_src *src) } free(tardata->entries); archive_read_close(tardata->ar); - archive_read_finish(tardata->ar); + archive_read_free(tardata->ar); archive_entry_free(tardata->ae); free(tardata); } @@ -123,8 +123,8 @@ static int tar_prep_read(const char *path, struct archive **archive, goto read_finish; archive_read_support_format_tar(ar); - archive_read_support_compression_gzip(ar); - archive_read_support_compression_bzip2(ar); + archive_read_support_filter_gzip(ar); + archive_read_support_filter_bzip2(ar); if (!strcmp(path, "-")) ret = archive_read_open_FILE(ar, stdin); @@ -140,7 +140,7 @@ static int tar_prep_read(const char *path, struct archive **archive, cleanup: archive_entry_free(ae); read_finish: - archive_read_finish(ar); + archive_read_free(ar); return ret; } @@ -216,7 +216,7 @@ cleanup: } } archive_read_close(ar); - archive_read_finish(ar); + archive_read_free(ar); archive_entry_free(ae); out: return ret;