From f01c6f814a278a3d024d34fed0c219c8cb1e1e33 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 27 Jun 2011 10:10:08 -0500 Subject: Fix several -Wshadow warnings Only one of these looked like a real red flag, in find_requiredby(), but it doesn't hurt to fix several of them up anyway. Unfortunately, we can't turn this on universally due to things like the sync(), remove(), etc. builtins which we often use as variable names. Signed-off-by: Dan McGee --- src/util/pactree.c | 4 ++-- src/util/testpkg.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/util') diff --git a/src/util/pactree.c b/src/util/pactree.c index 2f79b66d..5beaa5a7 100644 --- a/src/util/pactree.c +++ b/src/util/pactree.c @@ -120,7 +120,7 @@ static char *strtrim(char *str) return str; } -static int register_syncs(pmhandle_t *handle) { +static int register_syncs(void) { FILE *fp; char *ptr, *section = NULL; char line[LINE_MAX]; @@ -421,7 +421,7 @@ int main(int argc, char *argv[]) } if(searchsyncs) { - if(register_syncs(handle) != 0) { + if(register_syncs() != 0) { fprintf(stderr, "error: failed to register sync DBs\n"); ret = 1; goto finish; diff --git a/src/util/testpkg.c b/src/util/testpkg.c index c6f02e34..d4d058d8 100644 --- a/src/util/testpkg.c +++ b/src/util/testpkg.c @@ -60,7 +60,7 @@ int main(int argc, char *argv[]) if(alpm_pkg_load(handle, argv[1], 1, PM_PGP_VERIFY_OPTIONAL, &pkg) == -1 || pkg == NULL) { - enum _pmerrno_t err = alpm_errno(handle); + err = alpm_errno(handle); switch(err) { case PM_ERR_PKG_OPEN: printf("Cannot open the given file.\n"); -- cgit v1.2.3