From 015cdb21bd5527706859b7e5359f207250802679 Mon Sep 17 00:00:00 2001 From: morganamilo Date: Wed, 20 Sep 2023 04:32:21 +0100 Subject: [PATCH] Fix unused variable warning --- lib/libalpm/add.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index 774087fa..02fec676 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -415,7 +415,7 @@ static int extract_single_file(alpm_handle_t *handle, struct archive *archive, static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg, size_t pkg_current, size_t pkg_count) { - int i, ret = 0, errors = 0; + int ret = 0, errors = 0; int is_upgrade = 0; alpm_pkg_t *oldpkg = NULL; alpm_db_t *db = handle->db_local; @@ -538,7 +538,7 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg, /* call PROGRESS once with 0 percent, as we sort-of skip that here */ PROGRESS(handle, progress, newpkg->name, 0, pkg_count, pkg_current); - for(i = 0; archive_read_next_header(archive, &entry) == ARCHIVE_OK; i++) { + while(archive_read_next_header(archive, &entry) == ARCHIVE_OK) { int percent; if(newpkg->size != 0) {