From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4114 invoked by alias); 22 Nov 2011 13:25:15 -0000 Received: (qmail 4099 invoked by uid 22791); 22 Nov 2011 13:25:13 -0000 X-SWARE-Spam-Status: No, hits=-2.5 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; Tue, 22 Nov 2011 13:24:58 +0000 Received: by mail-bw0-f41.google.com with SMTP id 17so251217bke.0 for ; Tue, 22 Nov 2011 05:24:58 -0800 (PST) Received: by 10.205.139.65 with SMTP id iv1mr6696551bkc.34.1321968298013; Tue, 22 Nov 2011 05:24:58 -0800 (PST) Received: from bulbasaur (l49-9-169.cn.ru. [178.49.9.169]) by mx.google.com with ESMTPS id f14sm10085012bkv.3.2011.11.22.05.24.54 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 22 Nov 2011 05:24:55 -0800 (PST) From: Andrey Smirnov To: gdb-patches@sourceware.org Subject: [PATCH 33/348] Fix -Wsahdow warnings Date: Tue, 22 Nov 2011 13:25:00 -0000 Message-ID: <87r51070ik.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/x-diff Content-Disposition: inline; filename=0033-Fix-Wshadow-warnings.patch Content-Description: Fix -Wshadow warnings 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/msg00570.txt.bz2 >From 9b61ead63ef1410792628c11b8ffe8f5d914a67f Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Tue, 22 Nov 2011 17:55:58 +0700 Subject: [PATCH 33/39] Fix -Wshadow warnings. * breakpoint.c (update_global_location_list): Fix -Wshadow warnings. --- gdb/ChangeLog | 5 +++++ gdb/breakpoint.c | 22 +++++++++++----------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d82ee5c..77bff37 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..cba4d3e 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -10667,32 +10667,32 @@ update_global_location_list (int should_insert) { /* ALL_BP_LOCATIONS bp_location has LOC->OWNER always non-NULL. */ - struct breakpoint *b = loc->owner; + struct breakpoint *bp = loc->owner; struct bp_location **loc_first_p; - if (b->enable_state == bp_disabled - || b->enable_state == bp_call_disabled - || b->enable_state == bp_startup_disabled + if (bp->enable_state == bp_disabled + || bp->enable_state == bp_call_disabled + || bp->enable_state == bp_startup_disabled || !loc->enabled || loc->shlib_disabled - || !breakpoint_address_is_meaningful (b) + || !breakpoint_address_is_meaningful (bp) /* Don't detect duplicate for tracepoint locations because they are never duplicated. See the comments in field `duplicate' of `struct bp_location'. */ - || is_tracepoint (b)) + || is_tracepoint (bp)) continue; /* Permanent breakpoint should always be inserted. */ - if (b->enable_state == bp_permanent && ! loc->inserted) + if (bp->enable_state == bp_permanent && ! loc->inserted) internal_error (__FILE__, __LINE__, _("allegedly permanent breakpoint is not " "actually inserted")); - if (b->type == bp_hardware_watchpoint) + if (bp->type == bp_hardware_watchpoint) loc_first_p = &wp_loc_first; - else if (b->type == bp_read_watchpoint) + else if (bp->type == bp_read_watchpoint) loc_first_p = &rwp_loc_first; - else if (b->type == bp_access_watchpoint) + else if (bp->type == bp_access_watchpoint) loc_first_p = &awp_loc_first; else loc_first_p = &bp_loc_first; @@ -10715,7 +10715,7 @@ update_global_location_list (int should_insert) loc->duplicate = 1; if ((*loc_first_p)->owner->enable_state == bp_permanent && loc->inserted - && b->enable_state != bp_permanent) + && bp->enable_state != bp_permanent) internal_error (__FILE__, __LINE__, _("another breakpoint was inserted on top of " "a permanent breakpoint")); -- 1.7.5.4