]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Remove the unused variable `detected_bytes` 1676/head
authorKen Matsui <26405363+ken-matsui@users.noreply.github.com>
Sat, 5 Mar 2022 03:12:09 +0000 (12:12 +0900)
committerKen Matsui <26405363+ken-matsui@users.noreply.github.com>
Sat, 5 Mar 2022 04:43:51 +0000 (13:43 +0900)
libarchive/archive_read_support_format_mtree.c

index 88bca76fb9151b7f88521435cfc1e7651b84e89c..4a2816325f225e3550e51676d4b4df5772bded9a 100644 (file)
@@ -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;