From a4c3c90bb828ab5f01589718266ac5d3fdccb854 Mon Sep 17 00:00:00 2001 From: Ken Matsui <26405363+ken-matsui@users.noreply.github.com> Date: Sat, 5 Mar 2022 12:12:09 +0900 Subject: [PATCH] Remove the unused variable `detected_bytes` --- libarchive/archive_read_support_format_mtree.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libarchive/archive_read_support_format_mtree.c b/libarchive/archive_read_support_format_mtree.c index 88bca76fb9..4a2816325f 100644 --- a/libarchive/archive_read_support_format_mtree.c +++ b/libarchive/archive_read_support_format_mtree.c @@ -692,7 +692,7 @@ detect_form(struct archive_read *a, int *is_form_d) { const char *p; ssize_t avail, ravail; - ssize_t detected_bytes = 0, len, nl; + ssize_t len, nl; int entry_cnt = 0, multiline = 0; int form_D = 0;/* The archive is generated by `NetBSD mtree -D' * (In this source we call it `form D') . */ @@ -728,8 +728,6 @@ detect_form(struct archive_read *a, int *is_form_d) * character of previous line was '\' character. */ if (bid_keyword_list(p, len, 0, 0) <= 0) break; - if (multiline == 1) - detected_bytes += len; if (p[len-nl-1] != '\\') { if (multiline == 1 && ++entry_cnt >= MAX_BID_ENTRY) @@ -745,7 +743,6 @@ detect_form(struct archive_read *a, int *is_form_d) keywords = bid_entry(p, len, nl, &last_is_path); if (keywords >= 0) { - detected_bytes += len; if (form_D == 0) { if (last_is_path) form_D = 1;