Remove some unused variables

Found using the newly-enabled -Wunused-variable.

gdb/ChangeLog:

	* aarch64-linux-nat.c
	(aarch64_linux_nat_target::stopped_data_address): Remove unused
	variable.
	* arm-linux-nat.c (fetch_regs): Likewise.
	(store_regs): Likewise.
	(fetch_vfp_regs): Likewise.
	(store_vfp_regs): Likewise.
	(arm_linux_nat_target::insert_hw_breakpoint): Likewise.
	(arm_linux_nat_target::remove_hw_breakpoint): Likewise.
	(arm_linux_nat_target::insert_watchpoint): Likewise.
	(arm_linux_nat_target::remove_watchpoint): Likewise.
	* mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
	Likewise.
	* nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
	Likewise.
	* ppc-linux-nat.c (fetch_register): Likewise.
	(fetch_all_gp_regs): Likewise.
	(fetch_ppc_registers): Likewise.
	(store_all_gp_regs): Likewise.
	(store_ppc_registers): Likewise.
	(hwdebug_insert_point): Likewise.
	(can_use_watchpoint_cond_accel): Likewise.
	* remote-sim.c (gdb_os_write_stdout): Likewise.

gdb/gdbserver/ChangeLog:

	* linux-mips-low.c (mips_collect_ptrace_register): Remove unused
	variable.
	(mips_supply_ptrace_register): Likewise.
This commit is contained in:
Simon Marchi 2018-07-22 23:23:11 -04:00
parent 6018c5acdf
commit cf4088a92f
9 changed files with 37 additions and 26 deletions

View file

@ -205,7 +205,7 @@ store_fpregs (const struct regcache *regcache)
static void
fetch_regs (struct regcache *regcache)
{
int ret, regno, tid;
int ret, tid;
elf_gregset_t regs;
/* Get the thread id for the ptrace call. */
@ -232,7 +232,7 @@ fetch_regs (struct regcache *regcache)
static void
store_regs (const struct regcache *regcache)
{
int ret, regno, tid;
int ret, tid;
elf_gregset_t regs;
/* Get the thread id for the ptrace call. */
@ -339,7 +339,7 @@ static void
fetch_vfp_regs (struct regcache *regcache)
{
gdb_byte regbuf[VFP_REGS_SIZE];
int ret, regno, tid;
int ret, tid;
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
@ -368,7 +368,7 @@ static void
store_vfp_regs (const struct regcache *regcache)
{
gdb_byte regbuf[VFP_REGS_SIZE];
int ret, regno, tid;
int ret, tid;
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
@ -1064,7 +1064,6 @@ int
arm_linux_nat_target::insert_hw_breakpoint (struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt)
{
struct lwp_info *lp;
struct arm_linux_hw_breakpoint p;
if (arm_linux_get_hw_breakpoint_count () == 0)
@ -1082,7 +1081,6 @@ int
arm_linux_nat_target::remove_hw_breakpoint (struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt)
{
struct lwp_info *lp;
struct arm_linux_hw_breakpoint p;
if (arm_linux_get_hw_breakpoint_count () == 0)
@ -1134,7 +1132,6 @@ arm_linux_nat_target::insert_watchpoint (CORE_ADDR addr, int len,
enum target_hw_bp_type rw,
struct expression *cond)
{
struct lwp_info *lp;
struct arm_linux_hw_breakpoint p;
if (arm_linux_get_hw_watchpoint_count () == 0)
@ -1153,7 +1150,6 @@ arm_linux_nat_target::remove_watchpoint (CORE_ADDR addr,
int len, enum target_hw_bp_type rw,
struct expression *cond)
{
struct lwp_info *lp;
struct arm_linux_hw_breakpoint p;
if (arm_linux_get_hw_watchpoint_count () == 0)