From f01c6f814a278a3d024d34fed0c219c8cb1e1e33 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 27 Jun 2011 10:10:08 -0500 Subject: Fix several -Wshadow warnings Only one of these looked like a real red flag, in find_requiredby(), but it doesn't hurt to fix several of them up anyway. Unfortunately, we can't turn this on universally due to things like the sync(), remove(), etc. builtins which we often use as variable names. Signed-off-by: Dan McGee --- src/pacman/sync.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/pacman/sync.c') diff --git a/src/pacman/sync.c b/src/pacman/sync.c index f242c827..fa30b8da 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -443,7 +443,6 @@ static int sync_info(alpm_list_t *syncs, alpm_list_t *targets) if(targets) { for(i = targets; i; i = alpm_list_next(i)) { - pmdb_t *db = NULL; int foundpkg = 0; char target[512]; /* TODO is this enough space? */ @@ -452,6 +451,7 @@ static int sync_info(alpm_list_t *syncs, alpm_list_t *targets) strncpy(target, i->data, 512); pkgstr = strchr(target, '/'); if(pkgstr) { + pmdb_t *db = NULL; repo = target; *pkgstr = '\0'; ++pkgstr; @@ -767,7 +767,6 @@ static int sync_trans(alpm_list_t *targets) pm_fprintf(stderr, PM_LOG_ERROR, _("failed to prepare transaction (%s)\n"), alpm_strerror(err)); switch(err) { - alpm_list_t *i; case PM_ERR_PKG_INVALID_ARCH: for(i = data; i; i = alpm_list_next(i)) { char *pkg = alpm_list_getdata(i); @@ -835,7 +834,6 @@ static int sync_trans(alpm_list_t *targets) pm_fprintf(stderr, PM_LOG_ERROR, _("failed to commit transaction (%s)\n"), alpm_strerror(err)); switch(err) { - alpm_list_t *i; case PM_ERR_FILE_CONFLICTS: for(i = data; i; i = alpm_list_next(i)) { pmfileconflict_t *conflict = alpm_list_getdata(i); -- cgit v1.2.3-24-g4f1b