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