From a8a1b093eb23450244418232c9e30c4be035fc0b Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 7 Apr 2012 13:01:13 -0500 Subject: 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 --- src/pacman/sync.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pacman/sync.c') 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))); -- cgit v1.2.3-24-g4f1b