summaryrefslogtreecommitdiff
path: root/src/pacman/conf.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-04-07 13:01:13 -0500
committerDave Reisner <dreisner@archlinux.org>2012-04-08 22:28:45 -0400
commita8a1b093eb23450244418232c9e30c4be035fc0b (patch)
tree632a47273f1c4678984d66ecce0c41b6cb7ece1d /src/pacman/conf.c
parentec91133e38cb7c486ec995d4183f30e84f3ca736 (diff)
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.c6
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) {