summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-05-08 23:23:58 +0200
committerDan McGee <dan@archlinux.org>2012-05-21 00:54:42 +0200
commite533478e02882170653d79b756ae3d5690d076e9 (patch)
treebeb9840e8359b505426ea34a2095679f28a7f024 /lib
parent363894e27b07f00d7b1cd9f92214f3f457ac4c48 (diff)
downloadpacman-e533478e02882170653d79b756ae3d5690d076e9.tar.gz
pacman-e533478e02882170653d79b756ae3d5690d076e9.tar.xz
fix -Wshadow warnings as reported by gcc 4.4.3
Apparently gcc 4.7 has decided that -Wshadow warnings aren't worth reporting anymore even with the flag enabled. These were found on an Ubuntu 10.04 install. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/conflict.c4
-rw-r--r--lib/libalpm/deps.c16
-rw-r--r--lib/libalpm/dload.c20
3 files changed, 20 insertions, 20 deletions
diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c
index 5714932c..3b8fce0e 100644
--- a/lib/libalpm/conflict.c
+++ b/lib/libalpm/conflict.c
@@ -380,7 +380,7 @@ static int dir_belongsto_pkg(const char *root, const char *dirpath,
* 1: check every target against every target
* 2: check every target against the filesystem */
alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle,
- alpm_list_t *upgrade, alpm_list_t *remove)
+ alpm_list_t *upgrade, alpm_list_t *rem)
{
alpm_list_t *i, *conflicts = NULL;
size_t numtargs = alpm_list_count(upgrade);
@@ -498,7 +498,7 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle,
relative_path = path + rootlen;
/* Check remove list (will we remove the conflicting local file?) */
- for(k = remove; k && !resolved_conflict; k = k->next) {
+ for(k = rem; k && !resolved_conflict; k = k->next) {
alpm_pkg_t *rempkg = k->data;
if(rempkg && _alpm_filelist_contains(alpm_pkg_get_files(rempkg),
relative_path)) {
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c
index 98519bd0..2a06bb04 100644
--- a/lib/libalpm/deps.c
+++ b/lib/libalpm/deps.c
@@ -269,7 +269,7 @@ alpm_pkg_t SYMEXPORT *alpm_find_satisfier(alpm_list_t *pkgs, const char *depstri
* @return an alpm_list_t* of alpm_depmissing_t pointers.
*/
alpm_list_t SYMEXPORT *alpm_checkdeps(alpm_handle_t *handle,
- alpm_list_t *pkglist, alpm_list_t *remove, alpm_list_t *upgrade,
+ alpm_list_t *pkglist, alpm_list_t *rem, alpm_list_t *upgrade,
int reversedeps)
{
alpm_list_t *i, *j;
@@ -281,7 +281,7 @@ alpm_list_t SYMEXPORT *alpm_checkdeps(alpm_handle_t *handle,
for(i = pkglist; i; i = i->next) {
alpm_pkg_t *pkg = i->data;
- if(_alpm_pkg_find(remove, pkg->name) || _alpm_pkg_find(upgrade, pkg->name)) {
+ if(_alpm_pkg_find(rem, pkg->name) || _alpm_pkg_find(upgrade, pkg->name)) {
modified = alpm_list_add(modified, pkg);
} else {
dblist = alpm_list_add(dblist, pkg);
@@ -650,14 +650,14 @@ static alpm_pkg_t *resolvedep(alpm_handle_t *handle, alpm_depend_t *dep,
count = alpm_list_count(providers);
if(count >= 1) {
/* default to first provider if there is no QUESTION callback */
- int index = 0;
+ int idx = 0;
if(count > 1) {
/* if there is more than one provider, we ask the user */
QUESTION(handle, ALPM_QUESTION_SELECT_PROVIDER,
- providers, dep, NULL, &index);
+ providers, dep, NULL, &idx);
}
- if(index >= 0 && index < count) {
- alpm_list_t *nth = alpm_list_nth(providers, index);
+ if(idx >= 0 && idx < count) {
+ alpm_list_t *nth = alpm_list_nth(providers, idx);
alpm_pkg_t *pkg = nth->data;
alpm_list_free(providers);
return pkg;
@@ -722,7 +722,7 @@ alpm_pkg_t SYMEXPORT *alpm_find_dbs_satisfier(alpm_handle_t *handle,
*/
int _alpm_resolvedeps(alpm_handle_t *handle, alpm_list_t *localpkgs,
alpm_pkg_t *pkg, alpm_list_t *preferred, alpm_list_t **packages,
- alpm_list_t *remove, alpm_list_t **data)
+ alpm_list_t *rem, alpm_list_t **data)
{
int ret = 0;
alpm_list_t *i, *j;
@@ -745,7 +745,7 @@ int _alpm_resolvedeps(alpm_handle_t *handle, alpm_list_t *localpkgs,
for(i = alpm_list_last(*packages); i; i = i->next) {
alpm_pkg_t *tpkg = i->data;
targ = alpm_list_add(NULL, tpkg);
- deps = alpm_checkdeps(handle, localpkgs, remove, targ, 0);
+ deps = alpm_checkdeps(handle, localpkgs, rem, targ, 0);
alpm_list_free(targ);
for(j = deps; j; j = j->next) {
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
index 49bfa26f..6aaff1d2 100644
--- a/lib/libalpm/dload.c
+++ b/lib/libalpm/dload.c
@@ -322,7 +322,7 @@ static void curl_set_handle_opts(struct dload_payload *payload,
}
}
-static void mask_signal(int signal, void (*handler)(int),
+static void mask_signal(int signum, void (*handler)(int),
struct sigaction *origaction)
{
struct sigaction newaction;
@@ -331,13 +331,13 @@ static void mask_signal(int signal, void (*handler)(int),
sigemptyset(&newaction.sa_mask);
newaction.sa_flags = 0;
- sigaction(signal, NULL, origaction);
- sigaction(signal, &newaction, NULL);
+ sigaction(signum, NULL, origaction);
+ sigaction(signum, &newaction, NULL);
}
-static void unmask_signal(int signal, struct sigaction *sa)
+static void unmask_signal(int signum, struct sigaction *sa)
{
- sigaction(signal, sa, NULL);
+ sigaction(signum, sa, NULL);
}
static FILE *create_tempfile(struct dload_payload *payload, const char *localpath)
@@ -623,18 +623,18 @@ int _alpm_download(struct dload_payload *payload, const char *localpath,
static char *filecache_find_url(alpm_handle_t *handle, const char *url)
{
- const char *basename = strrchr(url, '/');
+ const char *filebase = strrchr(url, '/');
- if(basename == NULL) {
+ if(filebase == NULL) {
return NULL;
}
- basename++;
- if(basename == '\0') {
+ filebase++;
+ if(filebase == '\0') {
return NULL;
}
- return _alpm_filecache_find(handle, basename);
+ return _alpm_filecache_find(handle, filebase);
}
/** Fetch a remote pkg. */