public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 33/348] Fix -Wsahdow warnings
@ 2011-11-22 13:25 Andrey Smirnov
  2011-11-22 19:11 ` Tom Tromey
  0 siblings, 1 reply; 6+ messages in thread
From: Andrey Smirnov @ 2011-11-22 13:25 UTC (permalink / raw)
  To: gdb-patches

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Fix -Wshadow warnings --]
[-- Type: text/x-diff, Size: 2965 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-12-05 13:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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   ` [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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).