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/conf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/pacman/conf.c') diff --git a/src/pacman/conf.c b/src/pacman/conf.c index 4c3d063b..2632d18f 100644 --- a/src/pacman/conf.c +++ b/src/pacman/conf.c @@ -202,14 +202,14 @@ static int download_with_xfercommand(const char *url, const char *localpath, cleanup: /* restore the old cwd if we have it */ if(cwdfd >= 0) { - int ret; + int close_ret; if(fchdir(cwdfd) != 0) { pm_printf(ALPM_LOG_ERROR, _("could not restore working directory (%s)\n"), strerror(errno)); } do { - ret = close(cwdfd); - } while(ret == -1 && errno == EINTR); + close_ret = close(cwdfd); + } while(close_ret == -1 && errno == EINTR); } if(ret == -1) { -- cgit v1.2.3-54-g00ecf