summaryrefslogtreecommitdiffstats
path: root/src/pacman/sync.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-04-07 20:01:13 +0200
committerDave Reisner <dreisner@archlinux.org>2012-04-09 04:28:45 +0200
commita8a1b093eb23450244418232c9e30c4be035fc0b (patch)
tree632a47273f1c4678984d66ecce0c41b6cb7ece1d /src/pacman/sync.c
parentec91133e38cb7c486ec995d4183f30e84f3ca736 (diff)
downloadpacman-a8a1b093eb23450244418232c9e30c4be035fc0b.tar.gz
pacman-a8a1b093eb23450244418232c9e30c4be035fc0b.tar.xz
Various tweaks to support building with excessive GCC warning flags
This fixes a bunch of small issues in order to enable a clean successful build with a crazy number of GCC warning flags. A lot of these changes are covered by -Wshadow, -Wformat-security, and -Wstrict-overflow=5. 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, 2 insertions, 2 deletions
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 5165dca1..9c17f45f 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -307,12 +307,12 @@ static int sync_cleancache(int level)
static int sync_synctree(int level, alpm_list_t *syncs)
{
alpm_list_t *i;
- int success = 0, ret;
+ unsigned int success = 0;
for(i = syncs; i; i = alpm_list_next(i)) {
alpm_db_t *db = i->data;
- ret = alpm_db_update((level < 2 ? 0 : 1), db);
+ int ret = alpm_db_update((level < 2 ? 0 : 1), db);
if(ret < 0) {
pm_printf(ALPM_LOG_ERROR, _("failed to update %s (%s)\n"),
alpm_db_get_name(db), alpm_strerror(alpm_errno(config->handle)));