This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 30/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:23:30 +0700
- Subject: [PATCH 30/348] Fix -Wsahdow warnings
>From 8bdddc063c3d124b1f12f7a0a5e333eb213a5090 Mon Sep 17 00:00:00 2001
From: Andrey Smirnov <andrew.smirnov@gmail.com>
Date: Tue, 22 Nov 2011 17:52:01 +0700
Subject: [PATCH 30/39] Fix -Wshadow warnings.
* breakpoint.c (init_breakpoint_sal): Fix -Wshadow
warnings. Remove trailing whitespaces(some).
---
gdb/ChangeLog | 5 +++++
gdb/breakpoint.c | 9 +++++----
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2ff6715..037cbb0 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2011-11-22 Andrey Smirnov <andrew.smirnov@gmail.com>
+ * breakpoint.c (init_breakpoint_sal): Fix -Wshadow
+ warnings. Remove trailing whitespaces(some).
+
+2011-11-22 Andrey Smirnov <andrew.smirnov@gmail.com>
+
* breakpoint.c (bp_loc_is_permanent): Fix -Wshadow
warnings.
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 184a846..5b26ff0 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -7188,9 +7188,11 @@ init_breakpoint_sal (struct breakpoint *b, struct gdbarch *gdbarch,
if (type == bp_hardware_breakpoint)
{
- int i = hw_breakpoint_used_count ();
- int target_resources_ok =
- target_can_use_hardware_watchpoint (bp_hardware_breakpoint,
+ int target_resources_ok;
+
+ i = hw_breakpoint_used_count ();
+ target_resources_ok =
+ target_can_use_hardware_watchpoint (bp_hardware_breakpoint,
i + 1, 0);
if (target_resources_ok == 0)
error (_("No hardware breakpoint support in the target."));
@@ -7239,7 +7241,6 @@ init_breakpoint_sal (struct breakpoint *b, struct gdbarch *gdbarch,
char *p = &addr_string[3];
char *endp;
char *marker_str;
- int i;
p = skip_spaces (p);
--
1.7.5.4