From: Ken Matsui <26405363+ken-matsui@users.noreply.github.com> Date: Sat, 5 Mar 2022 03:12:09 +0000 (+0900) Subject: Remove the unused variable `detected_bytes` X-Git-Tag: v3.6.1~8^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F1676%2Fhead;p=thirdparty%2Flibarchive.git Remove the unused variable `detected_bytes` --- diff --git a/libarchive/archive_read_support_format_mtree.c b/libarchive/archive_read_support_format_mtree.c index 88bca76fb..4a2816325 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;