This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] cleanup: Wunused - amd64
- From: Aleksandar Ristovski <aristovski at qnx dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Wed, 30 Jan 2013 22:24:03 -0500
- Subject: [patch] cleanup: Wunused - amd64
- Newsgroups: gmane.comp.gdb.patches
Hello,
This is removing unused variables and allows compiling with -Wunused.
Thanks,
Aleksandar Ristovski
QNX Software Systems
ChangeLog:
Aleksandar Ristovski <aristovski@qnx.com>
* amd64-tdep.c (fixup_riprel): Remove unused BYTE_ORDER, DISP.
Index: gdb/amd64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/amd64-tdep.c,v
retrieving revision 1.117
diff -u -p -r1.117 amd64-tdep.c
--- gdb/amd64-tdep.c 1 Jan 2013 06:32:37 -0000 1.117
+++ gdb/amd64-tdep.c 30 Jan 2013 22:25:14 -0000
@@ -1225,12 +1225,10 @@ static void
fixup_riprel (struct gdbarch *gdbarch, struct displaced_step_closure *dsc,
CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
{
- enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
const struct amd64_insn *insn_details = &dsc->insn_details;
int modrm_offset = insn_details->modrm_offset;
gdb_byte *insn = insn_details->raw_insn + modrm_offset;
CORE_ADDR rip_base;
- int32_t disp;
int insn_length;
int arch_tmp_regno, tmp_regno;
ULONGEST orig_value;
@@ -1239,7 +1237,6 @@ fixup_riprel (struct gdbarch *gdbarch, s
++insn;
/* Compute the rip-relative address. */
- disp = extract_signed_integer (insn, sizeof (int32_t), byte_order);
insn_length = gdb_buffered_insn_length (gdbarch, dsc->insn_buf,
dsc->max_len, from);
rip_base = from + insn_length;