This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 31/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:24:26 +0700
- Subject: [PATCH 31/348] Fix -Wsahdow warnings
>From 73a8175c68bba7bdc0181a350c4fa15cd5a95cb1 Mon Sep 17 00:00:00 2001
From: Andrey Smirnov <andrew.smirnov@gmail.com>
Date: Tue, 22 Nov 2011 17:53:24 +0700
Subject: [PATCH 31/39] Fix -Wshadow warnings.
* breakpoint.c (create_breakpoint): Fix -Wshadow
warnings.
---
gdb/ChangeLog | 5 +++++
gdb/breakpoint.c | 13 ++++++-------
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 037cbb0..7f1383a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2011-11-22 Andrey Smirnov <andrew.smirnov@gmail.com>
+ * breakpoint.c (create_breakpoint): Fix -Wshadow
+ warnings.
+
+2011-11-22 Andrey Smirnov <andrew.smirnov@gmail.com>
+
* breakpoint.c (init_breakpoint_sal): Fix -Wshadow
warnings. Remove trailing whitespaces(some).
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 5b26ff0..623283d 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -7775,7 +7775,7 @@ create_breakpoint (struct gdbarch *gdbarch,
int parse_condition_and_thread,
int tempflag, enum bptype type_wanted,
int ignore_count,
- enum auto_boolean pending_break_support,
+ enum auto_boolean pending_break_support_type,
const struct breakpoint_ops *ops,
int from_tty, int enabled, int internal)
{
@@ -7800,7 +7800,7 @@ create_breakpoint (struct gdbarch *gdbarch,
if (type_wanted == bp_static_tracepoint && is_marker_spec (arg))
{
- int i;
+
sals = decode_static_tracepoint_spec (&arg);
@@ -7829,7 +7829,7 @@ create_breakpoint (struct gdbarch *gdbarch,
/* If pending breakpoint support is turned off, throw
error. */
- if (pending_break_support == AUTO_BOOLEAN_FALSE)
+ if (pending_break_support_type == AUTO_BOOLEAN_FALSE)
throw_exception (e);
exception_print (gdb_stderr, e);
@@ -7935,18 +7935,17 @@ create_breakpoint (struct gdbarch *gdbarch,
if (type_wanted == bp_static_tracepoint
&& is_marker_spec (canonical.canonical[0]))
{
- int i;
for (i = 0; i < sals.nelts; ++i)
{
struct symtabs_and_lines expanded;
struct tracepoint *tp;
- struct cleanup *old_chain;
+ struct cleanup *old_chain_cleanup;
expanded.nelts = 1;
expanded.sals = xmalloc (sizeof (struct symtab_and_line));
expanded.sals[0] = sals.sals[i];
- old_chain = make_cleanup (xfree, expanded.sals);
+ old_chain_cleanup = make_cleanup (xfree, expanded.sals);
tp = XCNEW (struct tracepoint);
init_breakpoint_sal (&tp->base, gdbarch, expanded,
@@ -7966,7 +7965,7 @@ create_breakpoint (struct gdbarch *gdbarch,
install_breakpoint (internal, &tp->base, 0);
- do_cleanups (old_chain);
+ do_cleanups (old_chain_cleanup);
}
}
else
--
1.7.5.4