summaryrefslogtreecommitdiffstats
path: root/src/pacman/sync.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-06-27 17:10:08 +0200
committerDan McGee <dan@archlinux.org>2011-06-27 17:10:08 +0200
commitf01c6f814a278a3d024d34fed0c219c8cb1e1e33 (patch)
tree759833d3d7c46bca4f962c5fd442ab3f37d85b14 /src/pacman/sync.c
parent77a09c92c66bd06440be0ccb75daf07c620acbee (diff)
downloadpacman-f01c6f814a278a3d024d34fed0c219c8cb1e1e33.tar.gz
pacman-f01c6f814a278a3d024d34fed0c219c8cb1e1e33.tar.xz
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 <dan@archlinux.org>
Diffstat (limited to 'src/pacman/sync.c')
-rw-r--r--src/pacman/sync.c4
1 files changed, 1 insertions, 3 deletions
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);