From: Andrey Smirnov <andrew.smirnov@gmail.com>
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 [thread overview]
Message-ID: <1322493153-29512-1-git-send-email-andrew.smirnov@gmail.com> (raw)
In-Reply-To: <m3obw42cr8.fsf@fleche.redhat.com>
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 <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..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
next prev parent reply other threads:[~2011-11-28 15:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-22 13:25 [PATCH 33/348] Fix -Wsahdow warnings Andrey Smirnov
2011-11-22 19:11 ` Tom Tromey
2011-11-28 15:13 ` Andrey Smirnov [this message]
2011-12-05 11:25 ` [PATCH 033/238] [misc.] breakpoint.c: -Wshadow fix 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=1322493153-29512-1-git-send-email-andrew.smirnov@gmail.com \
--to=andrew.smirnov@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.com \
/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