This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 19/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:01:56 +0700
- Subject: [PATCH 19/348] Fix -Wsahdow warnings
>From a2bf4daabc35d6f3ff9422ee46d3e56b29face0a Mon Sep 17 00:00:00 2001
From: Andrey Smirnov <andrew.smirnov@gmail.com>
Date: Tue, 22 Nov 2011 17:27:17 +0700
Subject: [PATCH 19/39] Fix -Wshadow warnings.
* amd64-tdep.c (amd64_get_unused_input_int_reg): Fix -Wshadow
warnings.
---
gdb/ChangeLog | 5 +++++
gdb/amd64-tdep.c | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 7f049a8..645743b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2011-11-22 Andrey Smirnov <andrew.smirnov@gmail.com>
+ * amd64-tdep.c (amd64_get_unused_input_int_reg): Fix -Wshadow
+ warnings.
+
+2011-11-22 Andrey Smirnov <andrew.smirnov@gmail.com>
+
* amd64-linux-tdep.c (amd64_canonicalize_syscall): Fix -Wshadow
warnings.
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
index bd31e54..29101a4 100644
--- a/gdb/amd64-tdep.c
+++ b/gdb/amd64-tdep.c
@@ -1082,9 +1082,9 @@ amd64_get_unused_input_int_reg (const struct amd64_insn *details)
if (have_sib)
{
int base = SIB_BASE_FIELD (details->raw_insn[details->modrm_offset + 1]);
- int index = SIB_INDEX_FIELD (details->raw_insn[details->modrm_offset + 1]);
+ int idx = SIB_INDEX_FIELD (details->raw_insn[details->modrm_offset + 1]);
used_regs_mask |= 1 << base;
- used_regs_mask |= 1 << index;
+ used_regs_mask |= 1 << idx;
}
else
{
--
1.7.5.4