aboutsummaryrefslogtreecommitdiffstats
path: root/ctags.c
diff options
context:
space:
mode:
authorJosh Triplett <josh@freedesktop.org>2007-05-01 11:30:58 -0700
committerJosh Triplett <josh@freedesktop.org>2007-05-01 11:30:58 -0700
commitbda7c7c515496a78ceb57d2ee07746f33e3c0c79 (patch)
treeb63c409cae82f13b5c02a060f867142b954dd74d /ctags.c
parentaec53c938c34c47cdbdd6824552e0f2a5104b1cb (diff)
downloadsparse-bda7c7c515496a78ceb57d2ee07746f33e3c0c79.tar.gz
sparse-bda7c7c515496a78ceb57d2ee07746f33e3c0c79.tar.xz
sparse-bda7c7c515496a78ceb57d2ee07746f33e3c0c79.zip
Fix most -Wshadow warnings in Sparse.
Signed-off-by: Josh Triplett <josh@freedesktop.org>
Diffstat (limited to 'ctags.c')
-rw-r--r--ctags.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ctags.c b/ctags.c
index 17dd1c1..bdddcf7 100644
--- a/ctags.c
+++ b/ctags.c
@@ -28,12 +28,13 @@ static int cmp_sym(const void *m, const void *n)
struct ident *b = ((struct symbol *)n)->ident;
int ret = strncmp(a->name, b->name, MAX(a->len, b->len));
if (!ret) {
- struct position a = ((struct symbol *)m)->pos;
- struct position b = ((struct symbol *)n)->pos;
+ struct position a_pos = ((struct symbol *)m)->pos;
+ struct position b_pos = ((struct symbol *)n)->pos;
- ret = strcmp(stream_name(a.stream), stream_name(b.stream));
+ ret = strcmp(stream_name(a_pos.stream),
+ stream_name(b_pos.stream));
if (!ret)
- return a.line < b.line;
+ return a_pos.line < b_pos.line;
}
return ret;
}