This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 28/348] Fix -Wsahdow warnings
- From: Andrey Smirnov <andrew dot smirnov at gmail dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 22 Nov 2011 20:22:33 +0700
- Subject: [PATCH 28/348] Fix -Wsahdow warnings
>From 94df7697dffd32d7552173c9c7befe91baeb05ab Mon Sep 17 00:00:00 2001
From: Andrey Smirnov <andrew.smirnov@gmail.com>
Date: Tue, 22 Nov 2011 17:48:28 +0700
Subject: [PATCH 28/39] Fix -Wshadow warnings.
* breakpoint.c (insert_breakpoint_locations): Fix -Wshadow
warnings.
---
gdb/ChangeLog | 5 +++++
gdb/breakpoint.c | 8 ++++----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fcd7868..82d81d4 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2011-11-22 Andrey Smirnov <andrew.smirnov@gmail.com>
+ * breakpoint.c (insert_breakpoint_locations): Fix -Wshadow
+ warnings.
+
+2011-11-22 Andrey Smirnov <andrew.smirnov@gmail.com>
+
* bfd-target.c (target_bfd_reopen): Fix -Wshadow
warnings.
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index dc891c0..46fe9dd 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -1943,7 +1943,7 @@ insert_breakpoint_locations (void)
{
struct breakpoint *bpt;
struct bp_location *bl, **blp_tmp;
- int error = 0;
+ int error_flag = 0;
int val = 0;
int disabled_breaks = 0;
int hw_breakpoint_error = 0;
@@ -1982,7 +1982,7 @@ insert_breakpoint_locations (void)
val = insert_bp_location (bl, tmp_error_stream, &disabled_breaks,
&hw_breakpoint_error);
if (val)
- error = val;
+ error_flag = val;
}
/* If we failed to insert all locations of a watchpoint, remove
@@ -2017,11 +2017,11 @@ insert_breakpoint_locations (void)
fprintf_unfiltered (tmp_error_stream,
"Could not insert hardware watchpoint %d.\n",
bpt->number);
- error = -1;
+ error_flag = -1;
}
}
- if (error)
+ if (error_flag)
{
/* If a hardware breakpoint or watchpoint was inserted, add a
message about possibly exhausted resources. */
--
1.7.5.4