diff options
author | Dan McGee <dan@archlinux.org> | 2012-04-07 20:01:13 +0200 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2012-04-09 04:28:45 +0200 |
commit | a8a1b093eb23450244418232c9e30c4be035fc0b (patch) | |
tree | 632a47273f1c4678984d66ecce0c41b6cb7ece1d /src/pacman/conf.c | |
parent | ec91133e38cb7c486ec995d4183f30e84f3ca736 (diff) | |
download | pacman-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/conf.c')
-rw-r--r-- | src/pacman/conf.c | 6 |
1 files changed, 3 insertions, 3 deletions
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) { |