From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2948 invoked by alias); 28 Nov 2011 15:07:10 -0000 Received: (qmail 2920 invoked by uid 22791); 28 Nov 2011 15:07:08 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-bw0-f41.google.com (HELO mail-bw0-f41.google.com) (209.85.214.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 28 Nov 2011 15:06:48 +0000 Received: by bke17 with SMTP id 17so9773191bke.0 for ; Mon, 28 Nov 2011 07:06:47 -0800 (PST) Received: by 10.204.13.78 with SMTP id b14mr31961075bka.23.1322492807449; Mon, 28 Nov 2011 07:06:47 -0800 (PST) Received: from localhost.localdomain (l49-9-169.cn.ru. [178.49.9.169]) by mx.google.com with ESMTPS id q6sm30189806bka.6.2011.11.28.07.06.45 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 28 Nov 2011 07:06:46 -0800 (PST) From: Andrey Smirnov To: gdb-patches@sourceware.org Subject: [PATCH 025/238] [misc.] bcache.c: -Wshadow fix Date: Mon, 28 Nov 2011 15:07:00 -0000 Message-Id: <1322492788-29388-3-git-send-email-andrew.smirnov@gmail.com> In-Reply-To: <1322492788-29388-1-git-send-email-andrew.smirnov@gmail.com> References: <1322492788-29388-1-git-send-email-andrew.smirnov@gmail.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-11/txt/msg00753.txt.bz2 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 + * bcache.c (bcache_xfree): Fix -Wshadow + warnings. + +2011-11-22 Andrey Smirnov + * 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