This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] cleanup: Wunused infrun, jit


Hello,

This is removing unused variables and allows compiling with -Wunused.


Thanks,


Aleksandar Ristovski
QNX Software Systems


ChangeLog:




Aleksandar Ristovski <aristovski@qnx.com>

        * infrun.c (handle_syscall_event): Remove unused GDBARCH.
        (save_infcall_suspend_state): Remove unused INF.
        (restore_infcall_suspend_state): Remove unused INF.
        * jit.c (jit_register_code): Remove unused I, B, INF_DATA.
        (jit_frame_sniffer): Remove unused INF_DATA.
Index: gdb/infrun.c
===================================================================
RCS file: /cvs/src/src/gdb/infrun.c,v
retrieving revision 1.573
diff -u -p -r1.573 infrun.c
--- gdb/infrun.c	18 Jan 2013 03:03:42 -0000	1.573
+++ gdb/infrun.c	30 Jan 2013 22:25:15 -0000
@@ -3073,14 +3073,12 @@ static int
 handle_syscall_event (struct execution_control_state *ecs)
 {
   struct regcache *regcache;
-  struct gdbarch *gdbarch;
   int syscall_number;
 
   if (!ptid_equal (ecs->ptid, inferior_ptid))
     context_switch (ecs->ptid);
 
   regcache = get_thread_regcache (ecs->ptid);
-  gdbarch = get_regcache_arch (regcache);
   syscall_number = ecs->ws.value.syscall_number;
   stop_pc = regcache_read_pc (regcache);
 
@@ -6745,7 +6743,6 @@ save_infcall_suspend_state (void)
 {
   struct infcall_suspend_state *inf_state;
   struct thread_info *tp = inferior_thread ();
-  struct inferior *inf = current_inferior ();
   struct regcache *regcache = get_current_regcache ();
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   gdb_byte *siginfo_data = NULL;
@@ -6800,7 +6797,6 @@ void
 restore_infcall_suspend_state (struct infcall_suspend_state *inf_state)
 {
   struct thread_info *tp = inferior_thread ();
-  struct inferior *inf = current_inferior ();
   struct regcache *regcache = get_current_regcache ();
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
 
Index: gdb/jit.c
===================================================================
RCS file: /cvs/src/src/gdb/jit.c,v
retrieving revision 1.45
diff -u -p -r1.45 jit.c
--- gdb/jit.c	21 Jan 2013 18:13:13 -0000	1.45
+++ gdb/jit.c	30 Jan 2013 22:25:15 -0000
@@ -926,9 +926,7 @@ static void
 jit_register_code (struct gdbarch *gdbarch,
                    CORE_ADDR entry_addr, struct jit_code_entry *code_entry)
 {
-  int i, success;
-  const struct bfd_arch_info *b;
-  struct jit_inferior_data *inf_data = get_jit_inferior_data ();
+  int success;
 
   if (jit_debug)
     fprintf_unfiltered (gdb_stdlog,
@@ -1115,13 +1113,10 @@ static int
 jit_frame_sniffer (const struct frame_unwind *self,
                    struct frame_info *this_frame, void **cache)
 {
-  struct jit_inferior_data *inf_data;
   struct jit_unwind_private *priv_data;
   struct gdb_unwind_callbacks callbacks;
   struct gdb_reader_funcs *funcs;
 
-  inf_data = get_jit_inferior_data ();
-
   callbacks.reg_get = jit_unwind_reg_get_impl;
   callbacks.reg_set = jit_unwind_reg_set_impl;
   callbacks.target_read = jit_target_read_impl;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]