This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 25/348] Fix -Wsahdow warnings
- From: Andrey Smirnov <andrew dot smirnov at gmail dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 22 Nov 2011 20:21:17 +0700
- Subject: [PATCH 25/348] Fix -Wsahdow warnings
>From e3c8dd6d1a099ac2377ac4fc00936dcd482ddc2c Mon Sep 17 00:00:00 2001
From: Andrey Smirnov <andrew.smirnov@gmail.com>
Date: Tue, 22 Nov 2011 17:41:49 +0700
Subject: [PATCH 25/39] Fix -Wshadow warnings.
* bcache.c (bcache_xfree): Fix -Wshadow
warnings.
---
gdb/ChangeLog | 5 +++++
gdb/bcache.c | 12 ++++++------
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b3ba09b..2702bdb 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2011-11-22 Andrey Smirnov <andrew.smirnov@gmail.com>
+ * bcache.c (bcache_xfree): Fix -Wshadow
+ warnings.
+
+2011-11-22 Andrey Smirnov <andrew.smirnov@gmail.com>
+
* bcache.c (bcache_full): Fix -Wshadow
warnings.
diff --git a/gdb/bcache.c b/gdb/bcache.c
index bd5b8ea..0220209 100644
--- a/gdb/bcache.c
+++ b/gdb/bcache.c
@@ -330,15 +330,15 @@ bcache_xmalloc (unsigned long (*hash_function)(const void *, int length),
/* Free all the storage associated with BCACHE. */
void
-bcache_xfree (struct bcache *bcache)
+bcache_xfree (struct bcache *cahce)
{
- if (bcache == NULL)
+ if (cahce == NULL)
return;
/* Only free the obstack if we actually initialized it. */
- if (bcache->total_count > 0)
- obstack_free (&bcache->cache, 0);
- xfree (bcache->bucket);
- xfree (bcache);
+ if (cahce->total_count > 0)
+ obstack_free (&cahce->cache, 0);
+ xfree (cahce->bucket);
+ xfree (cahce);
}
--
1.7.5.4