From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6263 invoked by alias); 28 Nov 2011 15:13:13 -0000 Received: (qmail 6248 invoked by uid 22791); 28 Nov 2011 15:13:11 -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:12:58 +0000 Received: by bke17 with SMTP id 17so9781904bke.0 for ; Mon, 28 Nov 2011 07:12:57 -0800 (PST) Received: by 10.204.129.70 with SMTP id n6mr46844780bks.0.1322493177200; Mon, 28 Nov 2011 07:12:57 -0800 (PST) Received: from localhost.localdomain (l49-9-169.cn.ru. [178.49.9.169]) by mx.google.com with ESMTPS id q6sm30223447bka.6.2011.11.28.07.12.55 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 28 Nov 2011 07:12:56 -0800 (PST) From: Andrey Smirnov To: gdb-patches@sourceware.org Cc: tromey@redhat.com Subject: [PATCH 033/238] [misc.] breakpoint.c: -Wshadow fix Date: Mon, 28 Nov 2011 15:13:00 -0000 Message-Id: <1322493153-29512-1-git-send-email-andrew.smirnov@gmail.com> In-Reply-To: References: 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/msg00757.txt.bz2 Cause: Variable in the inner scope shadowed by variable from outer one(defined at the beginning of function. To ChangeLog: * breakpoint.c (update_global_location_list): Remove nested declaration of `b'(-Wshadow). --- gdb/ChangeLog | 5 +++++ gdb/breakpoint.c | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cf6cc8f..f433ef5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2011-11-22 Andrey Smirnov + * breakpoint.c (update_global_location_list): Fix -Wshadow + warnings. + +2011-11-22 Andrey Smirnov + * breakpoint.c (watch_command_1): Fix -Wshadow warnings. diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 1a4974c..69a8782 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -10667,8 +10667,8 @@ update_global_location_list (int should_insert) { /* ALL_BP_LOCATIONS bp_location has LOC->OWNER always non-NULL. */ - struct breakpoint *b = loc->owner; struct bp_location **loc_first_p; + b = loc->owner; if (b->enable_state == bp_disabled || b->enable_state == bp_call_disabled -- 1.7.5.4