From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 33/348] Fix -Wsahdow warnings
Date: Tue, 22 Nov 2011 13:25:00 -0000 [thread overview]
Message-ID: <87r51070ik.fsf@gmail.com> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Fix -Wshadow warnings --]
[-- Type: text/x-diff, Size: 2966 bytes --]
From 9b61ead63ef1410792628c11b8ffe8f5d914a67f Mon Sep 17 00:00:00 2001
From: Andrey Smirnov <andrew.smirnov@gmail.com>
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 <andrew.smirnov@gmail.com>
+ * breakpoint.c (update_global_location_list): Fix -Wshadow
+ warnings.
+
+2011-11-22 Andrey Smirnov <andrew.smirnov@gmail.com>
+
* 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
next reply other threads:[~2011-11-22 13:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-22 13:25 Andrey Smirnov [this message]
2011-11-22 19:11 ` Tom Tromey
2011-11-28 15:13 ` [PATCH 033/238] [misc.] breakpoint.c: -Wshadow fix Andrey Smirnov
2011-12-05 11:25 ` Joel Brobecker
2011-12-05 13:05 ` Andrey Smirnov
2011-12-05 13:17 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r51070ik.fsf@gmail.com \
--to=andrew.smirnov@gmail.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox