[PATCH 025/238] [misc.] bcache.c: -Wshadow fix

Andrey Smirnov
2011-11-28T15:07:10Z

Cause:
`bcache' from "bcache.h"

To ChangeLog:
* bcache.c (bcache_xfree): Rename `bcache' to `cache'(-Wshadow).
---
gdb/ChangeLog | 5 +++++
gdb/bcache.c | 12 ++++++------
2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f23767c..8a0adc0 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 6e51cf2..6cd64f5 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 *cache)
{
- if (bcache == NULL)
+ if (cache == 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 (cache->total_count > 0)
+ obstack_free (&cache->cache, 0);
+ xfree (cache->bucket);
+ xfree (cache);
}

--
1.7.5.4