From: Michihiro NAKAJIMA Date: Tue, 25 Sep 2012 08:26:38 +0000 (+0900) Subject: Fix build failure on linux; remove unused variables and a function. X-Git-Tag: v3.1.0~46^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4736a0e2f0b2451cfbd7f89f2df9c5d783d1bcd7;p=thirdparty%2Flibarchive.git Fix build failure on linux; remove unused variables and a function. --- diff --git a/libarchive/archive_write_set_format_mtree.c b/libarchive/archive_write_set_format_mtree.c index d237b9e6e..453198b29 100644 --- a/libarchive/archive_write_set_format_mtree.c +++ b/libarchive/archive_write_set_format_mtree.c @@ -225,7 +225,6 @@ struct mtree_writer { | F_UNAME) #define attr_counter_set_reset attr_counter_set_free -static int attr_counter_dec(struct attr_counter **, struct attr_counter *); static void attr_counter_free(struct attr_counter **); static int attr_counter_inc(struct attr_counter **, struct attr_counter *, struct attr_counter *, struct mtree_entry *); @@ -629,38 +628,6 @@ attr_counter_inc(struct attr_counter **top, struct attr_counter *ac, return (0); } -static int -attr_counter_dec(struct attr_counter **top, struct attr_counter *ac) -{ - struct attr_counter *pac, *lpac; - - if (ac == NULL) - return (0); - - ac->count--; - if (ac->next == NULL || ac->next->count <= ac->count) - return (0); - for (lpac = pac = ac->next; pac; pac = pac->next) { - if (pac->count <= ac->count) - break; - lpac = pac; - } - if (ac->prev == NULL) - *top = ac->next; - else - ac->prev->next = ac->next; - ac->next->prev = ac->prev; - if (pac != NULL) { - ac->prev = pac->prev; - ac->next = pac; - pac->prev = ac; - } else { - ac->prev = lpac; - ac->next = NULL; - } - return (0); -} - /* * Tabulate uid,gid,mode and fflags of a entry in order to be used for /set. */ @@ -2181,7 +2148,6 @@ static int mtree_entry_exchange_same_entry(struct archive_write *a, struct mtree_entry *np, struct mtree_entry *file) { - struct mtree_writer *mtree = (struct mtree_writer *)a->format_data; if ((np->mode & AE_IFMT) != (file->mode & AE_IFMT)) { archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,