This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 033/238] [misc.] breakpoint.c: -Wshadow fix


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]