Simple unused variable removals
authorTom Tromey <tom@tromey.com>
Sun, 8 Jul 2018 18:15:04 +0000 (12:15 -0600)
committerTom Tromey <tom@tromey.com>
Sun, 22 Jul 2018 19:20:01 +0000 (13:20 -0600)
This patch holds all the straightforward unused variable deletions.

gdb/ChangeLog
2018-07-22  Tom Tromey  <tom@tromey.com>

* guile/scm-value.c (gdbscm_value_call): Remove unused variables.
* guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
(vlscm_convert_typed_value_from_scheme): Remove unused variable.
* buildsym-legacy.c (get_macro_table): Remove unused variable.
* stack.c (frame_apply_level_command): Remove unused variable.
* tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
* sparc64-tdep.c (adi_examine_command): Remove unused variable.
* rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
unused variable.
* nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
* mep-tdep.c (mep_push_dummy_call): Remove unused variable.
* ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
variable.
* amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
* arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
variable.
* breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
Remove unused variable.
* cli/cli-script.c (recurse_read_control_structure): Remove unused
variable.
* common/tdesc.c (print_xml_feature::visit): Remove unused
variable.
* compile/compile-object-load.c (store_regs): Remove unused
variables.
* complaints.c (clear_complaints): Remove unused variable.
* corelow.c (core_target_open): Remove unused variable.
* fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
variable.
* guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
variable.
* guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
variable.
* guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
variable.
* guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
variable.
* hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
variable.
* ia64-tdep.c (examine_prologue): Remove unused variable.
* infcall.c (run_inferior_call): Remove unused variable.
* inferior.c (exit_inferior): Remove unused variable.
* infrun.c (infrun_thread_ptid_changed): Remove unused variable.
* linespec.c (decode_line_2): Remove unused variable.
* linux-nat.c (super_close): Remove.
* linux-tdep.c (linux_info_proc): Remove unused variable.
* mi/mi-main.c (mi_execute_command): Remove unused variable.
* microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
Remove unused variable.
* parse.c (find_minsym_type_and_address): Remove unused variable.
* printcmd.c (info_symbol_command, printf_floating): Remove unused
variable.
* python/py-breakpoint.c (bppy_set_commands): Remove unused
variable.
* python/py-unwind.c (unwind_infopy_dealloc): Remove unused
variables.
* record-btrace.c (record_btrace_target::store_registers): Remove
unused variable.
(cmd_show_record_btrace_cpu): Remove unused variable.
* riscv-tdep.c (riscv_register_reggroup_p)
(riscv_push_dummy_call, riscv_return_value): Remove unused
variable.
* rust-exp.y (literal): Remove unused variable.
* rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
unused variable.
<STRUCTOP_ANONYMOUS>: Likewise.
* s390-linux-tdep.c (s390_linux_init_abi_31)
(s390_linux_init_abi_64): Remove unused variable.
* ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
(file_select_thread, net_windows_open, _initialize_ser_windows):
Remove unused variables.
* symtab.c (find_pc_sect_line): Remove unused variable.
* target-memory.c (compute_garbled_blocks): Remove unused
variable.
(target_write_memory_blocks): Remove unused variable.
* target.c (target_stack::unpush): Remove unused variables.
* tracepoint.c (start_tracing, all_tracepoint_actions)
(merge_uploaded_trace_state_variables)
(print_one_static_tracepoint_marker): Remove unused variable.
* unittests/basic_string_view/element_access/char/1.cc (test01):
Remove unused variable.
* windows-nat.c (windows_continue, windows_add_all_dlls)
(do_initial_windows_stuff, windows_nat_target::create_inferior):
Remove unused variables.

50 files changed:
gdb/ChangeLog
gdb/ada-lang.c
gdb/amd64-tdep.c
gdb/arm-tdep.c
gdb/breakpoint.c
gdb/buildsym-legacy.c
gdb/cli/cli-script.c
gdb/common/tdesc.c
gdb/compile/compile-object-load.c
gdb/complaints.c
gdb/corelow.c
gdb/fbsd-tdep.c
gdb/guile/scm-frame.c
gdb/guile/scm-math.c
gdb/guile/scm-symtab.c
gdb/guile/scm-type.c
gdb/guile/scm-utils.c
gdb/guile/scm-value.c
gdb/hppa-tdep.c
gdb/ia64-tdep.c
gdb/infcall.c
gdb/inferior.c
gdb/infrun.c
gdb/linespec.c
gdb/linux-nat.c
gdb/linux-tdep.c
gdb/mep-tdep.c
gdb/mi/mi-main.c
gdb/microblaze-linux-tdep.c
gdb/nios2-tdep.c
gdb/parse.c
gdb/printcmd.c
gdb/python/py-breakpoint.c
gdb/python/py-unwind.c
gdb/record-btrace.c
gdb/riscv-tdep.c
gdb/rs6000-lynx178-tdep.c
gdb/rust-exp.y
gdb/rust-lang.c
gdb/s390-linux-tdep.c
gdb/ser-mingw.c
gdb/sparc64-tdep.c
gdb/stack.c
gdb/symtab.c
gdb/target-memory.c
gdb/target.c
gdb/tic6x-tdep.c
gdb/tracepoint.c
gdb/unittests/basic_string_view/element_access/char/1.cc
gdb/windows-nat.c

index f76f92d88c5acf02966cb0cb13459a3c681a8b6d..2bbb8b3a9a9a00586383a24fda18c849feef8c92 100644 (file)
@@ -1,3 +1,89 @@
+2018-07-22  Tom Tromey  <tom@tromey.com>
+
+       * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
+       * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
+       (vlscm_convert_typed_value_from_scheme): Remove unused variable.
+       * buildsym-legacy.c (get_macro_table): Remove unused variable.
+       * stack.c (frame_apply_level_command): Remove unused variable.
+       * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
+       * sparc64-tdep.c (adi_examine_command): Remove unused variable.
+       * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
+       unused variable.
+       * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
+       * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
+       * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
+       variable.
+       * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
+       * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
+       variable.
+       * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
+       Remove unused variable.
+       * cli/cli-script.c (recurse_read_control_structure): Remove unused
+       variable.
+       * common/tdesc.c (print_xml_feature::visit): Remove unused
+       variable.
+       * compile/compile-object-load.c (store_regs): Remove unused
+       variables.
+       * complaints.c (clear_complaints): Remove unused variable.
+       * corelow.c (core_target_open): Remove unused variable.
+       * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
+       variable.
+       * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
+       variable.
+       * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
+       variable.
+       * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
+       variable.
+       * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
+       variable.
+       * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
+       variable.
+       * ia64-tdep.c (examine_prologue): Remove unused variable.
+       * infcall.c (run_inferior_call): Remove unused variable.
+       * inferior.c (exit_inferior): Remove unused variable.
+       * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
+       * linespec.c (decode_line_2): Remove unused variable.
+       * linux-nat.c (super_close): Remove.
+       * linux-tdep.c (linux_info_proc): Remove unused variable.
+       * mi/mi-main.c (mi_execute_command): Remove unused variable.
+       * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
+       Remove unused variable.
+       * parse.c (find_minsym_type_and_address): Remove unused variable.
+       * printcmd.c (info_symbol_command, printf_floating): Remove unused
+       variable.
+       * python/py-breakpoint.c (bppy_set_commands): Remove unused
+       variable.
+       * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
+       variables.
+       * record-btrace.c (record_btrace_target::store_registers): Remove
+       unused variable.
+       (cmd_show_record_btrace_cpu): Remove unused variable.
+       * riscv-tdep.c (riscv_register_reggroup_p)
+       (riscv_push_dummy_call, riscv_return_value): Remove unused
+       variable.
+       * rust-exp.y (literal): Remove unused variable.
+       * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
+       unused variable.
+       <STRUCTOP_ANONYMOUS>: Likewise.
+       * s390-linux-tdep.c (s390_linux_init_abi_31)
+       (s390_linux_init_abi_64): Remove unused variable.
+       * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
+       (file_select_thread, net_windows_open, _initialize_ser_windows):
+       Remove unused variables.
+       * symtab.c (find_pc_sect_line): Remove unused variable.
+       * target-memory.c (compute_garbled_blocks): Remove unused
+       variable.
+       (target_write_memory_blocks): Remove unused variable.
+       * target.c (target_stack::unpush): Remove unused variables.
+       * tracepoint.c (start_tracing, all_tracepoint_actions)
+       (merge_uploaded_trace_state_variables)
+       (print_one_static_tracepoint_marker): Remove unused variable.
+       * unittests/basic_string_view/element_access/char/1.cc (test01):
+       Remove unused variable.
+       * windows-nat.c (windows_continue, windows_add_all_dlls)
+       (do_initial_windows_stuff, windows_nat_target::create_inferior):
+       Remove unused variables.
+
 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
 
        * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
index 89cbec35b03848192a9ad7b9f649ad07e00e40e6..d9854b74175fd4bd50a320e4573a765199f01c21 100644 (file)
@@ -5786,7 +5786,6 @@ ada_lookup_symbol_list_worker (const lookup_name_info &lookup_name,
 {
   int syms_from_global_search;
   int ndefns;
-  int results_size;
   auto_obstack obstack;
 
   ada_add_all_symbols (&obstack, block, lookup_name,
index 190e086ebfe3abcfd4346db4214d7b8d65607571..088542d72b49ca6f5c2a5d58e1af3bf0b03e1ab2 100644 (file)
@@ -3373,7 +3373,6 @@ amd64_supply_xsave (struct regcache *regcache, int regnum,
       && gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 64)
     {
       const gdb_byte *regs = (const gdb_byte *) xsave;
-      static const gdb_byte zero[I386_MAX_REGISTER_SIZE] = { 0 };
       ULONGEST clear_bv;
 
       clear_bv = i387_xsave_get_clear_bv (gdbarch, xsave);
index 049a887b460d65e01aad120b2852a48e65931aeb..c3280ee211d17ff899dc56f7a7127d7b5e685d5b 100644 (file)
@@ -10220,7 +10220,7 @@ arm_record_data_proc_misc_ld_str (insn_decode_record *arm_insn_r)
   uint32_t record_buf[8], record_buf_mem[8];
   ULONGEST u_regval[2] = {0};
 
-  uint32_t reg_src1 = 0, reg_dest = 0;
+  uint32_t reg_src1 = 0;
   uint32_t opcode1 = 0;
 
   arm_insn_r->opcode = bits (arm_insn_r->arm_insn, 21, 24);
index b135db3db958c6f97d38f7c50b2287e0b4cd0758..9e04c7ea83a521d8af953c78a86e1d27583c49f4 100644 (file)
@@ -1009,8 +1009,6 @@ check_no_tracepoint_commands (struct command_line *commands)
 
   for (c = commands; c; c = c->next)
     {
-      int i;
-
       if (c->control_type == while_stepping_control)
        error (_("The 'while-stepping' command can "
                 "only be used for tracepoints"));
@@ -1775,7 +1773,7 @@ update_watchpoint (struct watchpoint *b, int reparse)
     {
       int pc = 0;
       std::vector<value_ref_ptr> val_chain;
-      struct value *v, *result, *next;
+      struct value *v, *result;
       struct program_space *frame_pspace;
 
       fetch_subexp_value (b->exp.get (), &pc, &v, &result, &val_chain, 0);
index 3553fa1c0abaa89a7ed71a73e56290f1b4f64d9b..20f046d0434e45c6e9897b673b336336ea3a7b88 100644 (file)
@@ -321,8 +321,6 @@ buildsym_compunit_symtab (void)
 struct macro_table *
 get_macro_table (void)
 {
-  struct objfile *objfile;
-
   gdb_assert (buildsym_compunit != NULL);
   return buildsym_compunit->get_macro_table ();
 }
index 87ebf9fc00c5e0e9adcbe2e864fe0a52949501de..6f31a40019750fde08b63a3d638b2b5d476cb56b 100644 (file)
@@ -1081,7 +1081,7 @@ recurse_read_control_structure (gdb::function_view<const char * ()> read_next_li
 {
   enum misc_command_type val;
   enum command_control_type ret;
-  struct command_line **body_ptr, *child_tail, *next;
+  struct command_line *child_tail, *next;
   counted_command_line *current_body = &current_cmd->body_list_0;
 
   child_tail = NULL;
index 68584a7f94f12840a9655d71edeb21b0859e9302..43a066e1e64afddfab8bf783570ac2833bbd2b90 100644 (file)
@@ -314,7 +314,6 @@ void print_xml_feature::visit (const tdesc_type_vector *t)
 
 void print_xml_feature::visit (const tdesc_type_with_fields *t)
 {
-  struct tdesc_type_field *f;
   const static char *types[] = { "struct", "union", "flags", "enum" };
 
   gdb_assert (t->kind >= TDESC_TYPE_STRUCT && t->kind <= TDESC_TYPE_ENUM);
index 9b3c51fe288dcdb9e7165d468d83fd8d4f6bcc16..a83f95dda93e82a1090942a09e6af27de5a7841b 100644 (file)
@@ -555,9 +555,7 @@ get_regs_type (struct symbol *func_sym, struct objfile *objfile)
 static void
 store_regs (struct type *regs_type, CORE_ADDR regs_base)
 {
-  thread_info *thread = inferior_thread ();
   struct gdbarch *gdbarch = target_gdbarch ();
-  struct regcache *regcache = get_thread_regcache (thread);
   int fieldno;
 
   for (fieldno = 0; fieldno < TYPE_NFIELDS (regs_type); fieldno++)
index 1bf99d40f01d364ed8ac37c9ff16d8f061c8a5b7..03102f13ab3d2d14a6b3e409ae16b7fb0137c3fe 100644 (file)
@@ -92,8 +92,6 @@ complaint_internal (const char *fmt, ...)
 void
 clear_complaints (int less_verbose)
 {
-  struct complain *p;
-
   counters.clear ();
 
   if (!less_verbose)
index ecf966525ed7b35503b8b21d9c6be876ade824ee..059ce2f6ebd33b994191b34f1e0cb7095567f2ea 100644 (file)
@@ -358,7 +358,6 @@ core_target_open (const char *arg, int from_tty)
 {
   const char *p;
   int siggy;
-  struct cleanup *old_chain;
   int scratch_chan;
   int flags;
 
index 9cea0098d6b9273333db19381266823b0bec451a..ac5b3bfa120b365e1c5bcf2b1bf2cd1680573986 100644 (file)
@@ -787,7 +787,6 @@ fbsd_core_info_proc_status (struct gdbarch *gdbarch)
 {
   const struct kinfo_proc_layout *kp;
   asection *section;
-  const char *state;
   unsigned char *descdata;
   int addr_bit, long_bit;
   size_t note_size;
index afd9702e64f151d9fc0f1c8471dfe2cf03775011..3d27907e1935455b2d55f72e129ad96c675cc115 100644 (file)
@@ -879,7 +879,6 @@ gdbscm_frame_read_var (SCM self, SCM symbol_scm, SCM rest)
   else if (scm_is_string (symbol_scm))
     {
       const struct block *block = NULL;
-      struct cleanup *cleanup;
       struct gdb_exception except = exception_none;
 
       if (! SCM_UNBNDP (block_scm))
index 74d50754a47d7d467f965761f1b24b0afda5e7f4..b82af4762cd249e9f9672ed8026e2dba001e54dd 100644 (file)
@@ -76,7 +76,6 @@ vlscm_unop_gdbthrow (enum valscm_unary_opcode opcode, SCM x,
 {
   struct gdbarch *gdbarch = get_current_arch ();
   const struct language_defn *language = current_language;
-  SCM result = SCM_BOOL_F;
 
   scoped_value_mark free_values;
 
@@ -142,7 +141,6 @@ vlscm_binop_gdbthrow (enum valscm_binary_opcode opcode, SCM x, SCM y,
   struct gdbarch *gdbarch = get_current_arch ();
   const struct language_defn *language = current_language;
   struct value *arg1, *arg2;
-  SCM result = SCM_BOOL_F;
   struct value *res_val = NULL;
   SCM except_scm;
 
@@ -791,7 +789,6 @@ vlscm_convert_typed_value_from_scheme (const char *func_name,
       else if (scm_is_string (obj))
        {
          size_t len;
-         struct cleanup *cleanup;
 
          if (type != NULL)
            {
index 7d94b817d0a99b43aeded4da1c02652172787974..14d1f81836b87082c03cc83e071e599e474b2d24 100644 (file)
@@ -395,7 +395,6 @@ static int
 stscm_print_sal_smob (SCM self, SCM port, scm_print_state *pstate)
 {
   sal_smob *s_smob = (sal_smob *) SCM_SMOB_DATA (self);
-  symtab_smob *st_smob = (symtab_smob *) SCM_SMOB_DATA (s_smob->symtab_scm);
 
   gdbscm_printf (port, "#<%s ", symtab_smob_name);
   scm_write (s_smob->symtab_scm, port);
index eee0efe9c1dcafa8a43e7734527219ca36bddd51..e9ae957b81f52a5c539e9b27b1cf3f53f054cc44 100644 (file)
@@ -1214,7 +1214,6 @@ gdbscm_field_baseclass_p (SCM self)
 {
   field_smob *f_smob
     = tyscm_get_field_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME);
-  struct field *field = tyscm_field_smob_to_field (f_smob);
   struct type *type = tyscm_field_smob_containing_type (f_smob);
 
   if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
index 8ea47f9cdf5c38926ff67af69aa34a55684e0db0..c24ff204837820b7143e0ff88f63c13292c42454 100644 (file)
@@ -387,7 +387,6 @@ gdbscm_parse_function_args (const char *func_name,
   SCM rest = SCM_EOL;
   /* Keep track of malloc'd strings.  We need to free them upon error.  */
   std::vector<char *> allocated_strings;
-  char *ptr;
 
   have_rest = validate_arg_format (format);
   num_keywords = count_keywords (keywords);
index 43f8001cf083727354bb741051477b29c3f4b3c6..18558605d062a0f362aabeb5d1fcd1c9cbfedb68 100644 (file)
@@ -680,11 +680,9 @@ gdbscm_value_call (SCM self, SCM args)
   value_smob *v_smob
     = vlscm_get_value_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME);
   struct value *function = v_smob->value;
-  struct value *mark = value_mark ();
   struct type *ftype = NULL;
   long args_count;
   struct value **vargs = NULL;
-  SCM result = SCM_BOOL_F;
 
   TRY
     {
index 1ea367042792aa7db4f1e8c8a6a06602db735bad..319096e056f2f37b1308ccf42f82af75cd0fc537 100644 (file)
@@ -2435,9 +2435,7 @@ static struct hppa_stub_unwind_cache *
 hppa_stub_frame_unwind_cache (struct frame_info *this_frame,
                              void **this_cache)
 {
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
   struct hppa_stub_unwind_cache *info;
-  struct unwind_table_entry *u;
 
   if (*this_cache)
     return (struct hppa_stub_unwind_cache *) *this_cache;
index c7fc3c6f1678bc411da48c5be18150207f6d5386..5e9ecb5151508d2eb822b6037d07e6bd21ab9dca 100644 (file)
@@ -1526,11 +1526,8 @@ examine_prologue (CORE_ADDR pc, CORE_ADDR lim_pc,
                 where the pc is.  If it's still early in the prologue
                 this'll be wrong.  FIXME */
              if (this_frame)
-               {
-                 struct gdbarch *gdbarch = get_frame_arch (this_frame);
-                 saved_sp = get_frame_register_unsigned (this_frame,
-                                                         sp_regnum);
-               }
+               saved_sp = get_frame_register_unsigned (this_frame,
+                                                       sp_regnum);
              spill_addr  = saved_sp
                          + (rM == 12 ? 0 : mem_stack_frame_size) 
                          + imm;
index 172c26ac820ea77a3c58b92c3ac8fe00fcc49f6a..c995ab7c9185d30296bffc50dec9016454dc77a7 100644 (file)
@@ -587,7 +587,6 @@ run_inferior_call (struct call_thread_fsm *sm,
   struct gdb_exception caught_error = exception_none;
   int saved_in_infcall = call_thread->control.in_infcall;
   ptid_t call_thread_ptid = call_thread->ptid;
-  inferior *call_thread_inf = call_thread->inf;
   enum prompt_state saved_prompt_state = current_ui->prompt_state;
   int was_running = call_thread->state == THREAD_RUNNING;
   int saved_ui_async = current_ui->async;
index 16991d41b3bcd9d8d7bb8874a47eb50c67f7b6ad..76f5581b7dbe4e00100d1e2d846d24fc160ebfa5 100644 (file)
@@ -232,7 +232,6 @@ exit_inferior_1 (struct inferior *inftoex, int silent)
 void
 exit_inferior (inferior *inf)
 {
-  int pid = inf->pid;
   exit_inferior_1 (inf, 0);
 }
 
index dd7e69e718e297b107c0da1afda53e4690d7b7cf..05523a275630ec9cf93c46fee2f859111f47530d 100644 (file)
@@ -2174,8 +2174,6 @@ start_step_over (void)
 static void
 infrun_thread_ptid_changed (ptid_t old_ptid, ptid_t new_ptid)
 {
-  struct displaced_step_inferior_state *displaced;
-
   if (inferior_ptid == old_ptid)
     inferior_ptid = new_ptid;
 }
index 2a4189278ef57847b5cfd2046c470b9c77a9d9f8..790ddf47409bbf0956eac25c1d3500f10610d868 100644 (file)
@@ -1501,8 +1501,6 @@ decode_line_2 (struct linespec_state *self,
   for (i = 0; i < result->size (); ++i)
     {
       const struct linespec_canonical_name *canonical;
-      struct decode_line_2_item *item;
-
       std::string displayform;
 
       canonical = &self->canonical_names[i];
index 18d9a3872a57b233c167b01f6b21380ea90952d4..86d3dfd2b894c1fb6b830742abd3a05f0aae78d1 100644 (file)
@@ -191,10 +191,6 @@ struct linux_nat_target *linux_target;
 /* Does the current host support PTRACE_GETREGSET?  */
 enum tribool have_ptrace_getregset = TRIBOOL_UNKNOWN;
 
-/* The saved to_close method, inherited from inf-ptrace.c.
-   Called by our to_close.  */
-static void (*super_close) (struct target_ops *);
-
 static unsigned int debug_linux_nat;
 static void
 show_debug_linux_nat (struct ui_file *file, int from_tty,
index 5edf2ef2005ac48ce2e774fdae60885a3472f1aa..3cfa2a5aa48d18158e6a6427245b61d4cd0f3aa6 100644 (file)
@@ -726,7 +726,6 @@ linux_info_proc (struct gdbarch *gdbarch, const char *args,
   int status_f = (what == IP_STATUS || what == IP_ALL);
   int stat_f = (what == IP_STAT || what == IP_ALL);
   char filename[100];
-  char *data;
   int target_errno;
 
   if (args && isdigit (args[0]))
index c8a5ecfbe07c678b2db4d8a2ec45a9f6183ad8d2..69e7fdda5975ef5100f3e0af27e36a55064842af 100644 (file)
@@ -2264,7 +2264,6 @@ mep_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
 {
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   CORE_ADDR *copy = (CORE_ADDR *) alloca (argc * sizeof (copy[0]));
-  CORE_ADDR func_addr = find_function_addr (function, NULL);
   int i;
 
   /* The number of the next register available to hold an argument.  */
index 18ce4e675f3e0061ab26394a9c7b7c97ca03b75a..2163d4230285af2399c061ea488eb7ad4d3484f1 100644 (file)
@@ -1999,7 +1999,6 @@ mi_execute_command (const char *cmd, int from_tty)
             again.  */
          && !command_notifies_uscc_observer (command.get ()))
        {
-         struct mi_interp *mi = (struct mi_interp *) top_level_interpreter ();
          int report_change = 0;
 
          if (command->thread == -1)
index 5fc2cc8bab5e572b7d30374e5cd15fc51226680c..8bc153aec4890a3c581d84bced02f7380ce75b6d 100644 (file)
@@ -70,8 +70,6 @@ microblaze_linux_sigtramp_cache (struct frame_info *next_frame,
   CORE_ADDR base;
   CORE_ADDR gpregs;
   int regnum;
-  struct gdbarch *gdbarch = get_frame_arch (next_frame);
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
 
   base = frame_unwind_register_unsigned (next_frame, MICROBLAZE_SP_REGNUM);
   if (bias > 0 && get_frame_address_in_block (next_frame) != func)
index 91b4381f0b753bd3b8e6a3fdf8de33bc6e83e483..c7d5b9f58f678e760a1f83d8a4284629369b4707 100644 (file)
@@ -1820,7 +1820,6 @@ nios2_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
   int argnum;
   int len = 0;
   int stack_offset = 0;
-  CORE_ADDR func_addr = find_function_addr (function, NULL);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
 
   /* Set the return address register to point to the entry point of
index acb08f243639b47b51031dc0579a42ad92923222..0cbdb48d23a1e9edaa21574e8815df2f68fbb7ad 100644 (file)
@@ -458,7 +458,6 @@ find_minsym_type_and_address (minimal_symbol *msymbol,
                              CORE_ADDR *address_p)
 {
   bound_minimal_symbol bound_msym = {msymbol, objfile};
-  struct gdbarch *gdbarch = get_objfile_arch (objfile);
   struct obj_section *section = MSYMBOL_OBJ_SECTION (objfile, msymbol);
   enum minimal_symbol_type type = MSYMBOL_TYPE (msymbol);
 
index 696285ed8a42839d4ca477a06d99fa6a241e22e8..2ecbd546532280e68723a7c2aa142b9b8367fd44 100644 (file)
@@ -1297,7 +1297,6 @@ info_symbol_command (const char *arg, int from_tty)
       {
        const char *obj_name, *mapped, *sec_name, *msym_name;
        const char *loc_string;
-       struct cleanup *old_chain;
 
        matches = 1;
        offset = sect_addr - MSYMBOL_VALUE_ADDRESS (objfile, msymbol);
@@ -2286,7 +2285,6 @@ printf_floating (struct ui_file *stream, const char *format,
   /* Parameter data.  */
   struct type *param_type = value_type (value);
   struct gdbarch *gdbarch = get_type_arch (param_type);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
 
   /* Determine target type corresponding to the format string.  */
   struct type *fmt_type;
index a66e553cf8333ae181a876d801cdbdafc724aa4c..e1db674647a394efefd819f171aa8794d9f49ac0 100644 (file)
@@ -516,7 +516,6 @@ static int
 bppy_set_commands (PyObject *self, PyObject *newvalue, void *closure)
 {
   gdbpy_breakpoint_object *self_bp = (gdbpy_breakpoint_object *) self;
-  struct breakpoint *bp = self_bp->bp;
   struct gdb_exception except = exception_none;
 
   BPPY_SET_REQUIRE_VALID (self_bp);
index 569d1f48d87186d1389fbdae67f28803df712499..469ae489f43fc02084672058a015416f1a566ea1 100644 (file)
@@ -329,8 +329,6 @@ static void
 unwind_infopy_dealloc (PyObject *self)
 {
   unwind_info_object *unwind_info = (unwind_info_object *) self;
-  int i;
-  saved_reg *reg;
 
   Py_XDECREF (unwind_info->pending_frame);
   delete unwind_info->saved_regs;
index 09a3f6cc5c436c0c2416dd3c440ca726ceb0c29f..eafecd967d904d55c0e39c6642a530023b989e6f 100644 (file)
@@ -1569,8 +1569,6 @@ record_btrace_target::fetch_registers (struct regcache *regcache, int regno)
 void
 record_btrace_target::store_registers (struct regcache *regcache, int regno)
 {
-  struct target_ops *t;
-
   if (!record_btrace_generating_corefile
       && record_is_replaying (regcache->ptid ()))
     error (_("Cannot write registers while replaying."));
@@ -3085,8 +3083,6 @@ cmd_set_record_btrace_cpu (const char *args, int from_tty)
 static void
 cmd_show_record_btrace_cpu (const char *args, int from_tty)
 {
-  const char *cpu;
-
   if (args != nullptr && *args != 0)
     error (_("Trailing junk: '%s'."), args);
 
index f5d1af822c7391d2877a9ced5ab26b43c415c54b..abcac98016d8307b731d296468a0c42d485efd9d 100644 (file)
@@ -757,8 +757,6 @@ static int
 riscv_register_reggroup_p (struct gdbarch  *gdbarch, int regnum,
                           struct reggroup *reggroup)
 {
-  int float_p;
-  int raw_p;
   unsigned int i;
 
   /* Used by 'info registers' and 'info registers <groupname>'.  */
@@ -2018,7 +2016,6 @@ riscv_push_dummy_call (struct gdbarch *gdbarch,
   int i;
   CORE_ADDR sp_args, sp_refs;
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
 
   struct riscv_arg_info *arg_info =
     (struct riscv_arg_info *) alloca (nargs * sizeof (struct riscv_arg_info));
@@ -2204,10 +2201,6 @@ riscv_return_value (struct gdbarch  *gdbarch,
                    gdb_byte *readbuf,
                    const gdb_byte *writebuf)
 {
-  enum type_code rv_type = TYPE_CODE (type);
-  unsigned int rv_size = TYPE_LENGTH (type);
-  int fp, regnum, flen;
-  ULONGEST tmp;
   struct riscv_call_info call_info (gdbarch);
   struct riscv_arg_info info;
   struct type *arg_type;
index 13eed3aeaeacf01a37aaf70cf9d197101d525bd3..44cd0d013dc76c62307805b8a11d74f6eeb14578 100644 (file)
@@ -44,7 +44,6 @@ rs6000_lynx178_push_dummy_call (struct gdbarch *gdbarch,
   gdb_byte tmp_buffer[50];
   int f_argno = 0;             /* current floating point argno */
   int wordsize = gdbarch_tdep (gdbarch)->wordsize;
-  CORE_ADDR func_addr = find_function_addr (function, NULL);
 
   struct value *arg = 0;
   struct type *type;
index 256eabe732a0ab3e19e307224e9227dc133e79f1..248e558a544688549d82e0735d7fbfd270c964f1 100644 (file)
@@ -583,7 +583,6 @@ literal:
                { $$ = parser->ast_dliteral ($1); }
 |      STRING
                {
-                 const struct rust_op *str = parser->ast_string ($1);
                  struct set_field field;
                  struct typed_val_int val;
                  struct stoken token;
index 5f4aceb86ba91949ff2f8ce2293698e2b068956a..1871ec7df9beea2d5022eb0bf82a42680aaa7dc1 100644 (file)
@@ -1555,7 +1555,7 @@ rust_evaluate_subexp (struct type *expect_type, struct expression *exp,
 
     case OP_RUST_ARRAY:
       {
-       int pc = (*pos)++;
+       (*pos)++;
        int copies;
        struct value *elt;
        struct value *ncopies;
@@ -1589,7 +1589,7 @@ rust_evaluate_subexp (struct type *expect_type, struct expression *exp,
         /* Anonymous field access, i.e. foo.1.  */
         struct value *lhs;
         int pc, field_number, nfields;
-        struct type *type, *variant_type;
+        struct type *type;
 
         pc = (*pos)++;
         field_number = longest_to_int (exp->elts[pc + 1].longconst);
index d9ac40b625f97c7a1f80a76b5fbc8f4a92cb96d3..4561559a8556494e4e68f92d3701ed7449e7b74f 100644 (file)
@@ -1150,7 +1150,6 @@ s390_linux_init_abi_any (struct gdbarch_info info, struct gdbarch *gdbarch)
 static void
 s390_linux_init_abi_31 (struct gdbarch_info info, struct gdbarch *gdbarch)
 {
-  const struct target_desc *tdesc = info.target_desc;
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
 
   tdep->abi = ABI_LINUX_S390;
@@ -1167,7 +1166,6 @@ s390_linux_init_abi_31 (struct gdbarch_info info, struct gdbarch *gdbarch)
 static void
 s390_linux_init_abi_64 (struct gdbarch_info info, struct gdbarch *gdbarch)
 {
-  const struct target_desc *tdesc = info.target_desc;
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
 
   tdep->abi = ABI_LINUX_ZSERIES;
index 605a071770ace76a059e8b749df2a481e3319236..937b66dd57b7ad7b057d7966adc5eb24eb99c5d4 100644 (file)
@@ -321,9 +321,8 @@ ser_windows_read_prim (struct serial *scb, size_t count)
 {
   struct ser_windows_state *state;
   OVERLAPPED ov;
-  DWORD bytes_read, bytes_read_tmp;
+  DWORD bytes_read;
   HANDLE h;
-  gdb_byte *p;
 
   state = (struct ser_windows_state *) scb->state;
   if (state->in_progress)
@@ -351,7 +350,6 @@ ser_windows_read_prim (struct serial *scb, size_t count)
 static int
 ser_windows_write_prim (struct serial *scb, const void *buf, size_t len)
 {
-  struct ser_windows_state *state;
   OVERLAPPED ov;
   DWORD bytes_written;
   HANDLE h;
@@ -634,7 +632,6 @@ pipe_select_thread (void *arg)
 {
   struct serial *scb = (struct serial *) arg;
   struct ser_console_state *state;
-  int event_index;
   HANDLE h;
 
   state = (struct ser_console_state *) scb->state;
@@ -677,7 +674,6 @@ file_select_thread (void *arg)
 {
   struct serial *scb = (struct serial *) arg;
   struct ser_console_state *state;
-  int event_index;
   HANDLE h;
 
   state = (struct ser_console_state *) scb->state;
@@ -1188,7 +1184,6 @@ net_windows_open (struct serial *scb, const char *name)
 {
   struct net_windows_state *state;
   int ret;
-  DWORD threadId;
 
   ret = net_open (scb, name);
   if (ret != 0)
@@ -1347,7 +1342,6 @@ void
 _initialize_ser_windows (void)
 {
   WSADATA wsa_data;
-  struct serial_ops *ops;
 
   HMODULE hm = NULL;
 
index 8d96cfc0969930bed1a13f19d09e0de71873eb51..f25f554f753566b9c1dbcdc6dccafc5706542f08 100644 (file)
@@ -461,8 +461,6 @@ adi_examine_command (const char *args, int from_tty)
   if (!adi_available ())
     error (_("No ADI information"));
 
-  pid_t pid = inferior_ptid.pid ();
-  sparc64_adi_info *proc = get_adi_info_proc (pid);
   int cnt = 1;
   const char *p = args;
   if (p && *p == '/')
index e51c689f4370509a2981539e87b5950f44673d87..3da46dd955a9dbceae369b76fae20d9f21f8e092 100644 (file)
@@ -2629,7 +2629,8 @@ frame_apply_level_command (const char *cmd, int from_tty)
   /* Skip the LEVEL list to find the flags and command args.  */
   while (!levels.finished ())
     {
-      const int level_beg = levels.get_number ();
+      /* Call for effect.  */
+      levels.get_number ();
 
       level_found = true;
       if (levels.in_range ())
index d8a7a16e0733694d6425a994a82c1aab8d82b1d1..73c79833ce5193e48431bc2c42d2d56fa70d63bd 100644 (file)
@@ -3053,7 +3053,6 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
   struct symtab *iter_s;
   struct linetable *l;
   int len;
-  int i;
   struct linetable_entry *item;
   const struct blockvector *bv;
   struct bound_minimal_symbol msymbol;
index 783e59dd551777bded10b93129caaab9d3aa6b68..670576de188e323586b4f90932a0574f98bfeebc 100644 (file)
@@ -180,7 +180,6 @@ compute_garbled_blocks (const std::vector<memory_write_request> &erased_blocks,
 
   unsigned j;
   unsigned je = written_blocks.size ();
-  struct memory_write_request *erased_p;
 
   /* Look at each erased memory_write_request in turn, and
      see what part of it is subsequently written to.
@@ -265,7 +264,6 @@ target_write_memory_blocks (const std::vector<memory_write_request> &requests,
                            void (*progress_cb) (ULONGEST, void *))
 {
   std::vector<memory_write_request> blocks = requests;
-  struct memory_write_request *r;
   std::vector<memory_write_request> regular;
   std::vector<memory_write_request> flash;
   std::vector<memory_write_request> erased, garbled;
index 19d59ba603a27de38fba05eea10b7147a372fcbc..eba07cc9174290a20368087f6d52cc37c1d99c67 100644 (file)
@@ -674,9 +674,6 @@ unpush_target (struct target_ops *t)
 bool
 target_stack::unpush (target_ops *t)
 {
-  struct target_ops **cur;
-  struct target_ops *tmp;
-
   if (t->to_stratum == dummy_stratum)
     internal_error (__FILE__, __LINE__,
                    _("Attempt to unpush the dummy target"));
index efb8b0561b4c2250c68630f3a5bf8e2cb12f8614..b1711bad29339b5c3fea6c18c597088dbc60867b 100644 (file)
@@ -882,7 +882,6 @@ tic6x_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
   int argnum;
   int stack_offset = 4;
   int references_offset = 4;
-  CORE_ADDR func_addr = find_function_addr (function, NULL);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   struct type *func_type = value_type (function);
   /* The first arg passed on stack.  Mostly the first 10 args are passed by
index ab80b10ea1da11512b507fd44ccb1a05d18c271d..74d1183386cb01686a027737a275080b0e70dfda 100644 (file)
@@ -1543,7 +1543,6 @@ trace_reset_local_state (void)
 void
 start_tracing (const char *notes)
 {
-  struct trace_state_variable *tsv;
   int any_enabled = 0, num_to_download = 0;
   int ret;
 
@@ -2752,7 +2751,6 @@ all_tracepoint_actions (struct breakpoint *t)
      the fly, and don't cache it.  */
   if (*default_collect)
     {
-      struct command_line *default_collect_action;
       gdb::unique_xmalloc_ptr<char> default_collect_line
        (xstrprintf ("collect %s", default_collect));
 
@@ -3179,7 +3177,6 @@ create_tsv_from_upload (struct uploaded_tsv *utsv)
 void
 merge_uploaded_trace_state_variables (struct uploaded_tsv **uploaded_tsvs)
 {
-  int ix;
   struct uploaded_tsv *utsv;
   struct trace_state_variable *tsv;
   int highest;
@@ -3682,7 +3679,6 @@ print_one_static_tracepoint_marker (int count,
   if (!tracepoints.empty ())
     {
       int ix;
-      struct breakpoint *b;
 
       {
        ui_out_emit_tuple tuple_emitter (uiout, "tracepoints-at");
index 7f8e79e6d008976e55059b5d8f405613e6ff85b0..bba1782b1e32ca7e4139ed9572f71d034506d716 100644 (file)
@@ -27,7 +27,7 @@ test01()
   typedef gdb::string_view::size_type csize_type;
   typedef gdb::string_view::const_reference cref;
   typedef gdb::string_view::reference ref;
-  csize_type csz01, csz02;
+  csize_type csz01;
 
   const gdb::string_view str01("tamarindo, costa rica");
   gdb::string_view str02("41st street beach, capitola, california");
index 5050e96fd126e78eb7f59b3ae0915c54b6e46ca3..3f722a14389ecfa03f00f20a09737bdd85199e57 100644 (file)
@@ -1298,7 +1298,6 @@ handle_exception (struct target_waitstatus *ourstatus)
 static BOOL
 windows_continue (DWORD continue_status, int id, int killed)
 {
-  int i;
   windows_thread_info *th;
   BOOL res;
 
@@ -1765,7 +1764,6 @@ windows_nat_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus,
 static void
 windows_add_all_dlls (void)
 {
-  struct so_list *so;
   HMODULE dummy_hmodule;
   DWORD cb_needed;
   HMODULE *hmodules;
@@ -1815,7 +1813,6 @@ do_initial_windows_stuff (struct target_ops *ops, DWORD pid, int attaching)
 {
   int i;
   struct inferior *inf;
-  struct thread_info *tp;
 
   last_sig = GDB_SIGNAL_0;
   event_count = 0;
@@ -2516,16 +2513,12 @@ windows_nat_target::create_inferior (const char *exec_file,
   int tty;
   int ostdin, ostdout, ostderr;
 #else  /* !__CYGWIN__ */
-  char real_path[__PMAX];
   char shell[__PMAX]; /* Path to shell */
   const char *toexec;
   char *args, *allargs_copy;
   size_t args_len, allargs_len;
   int fd_inp = -1, fd_out = -1, fd_err = -1;
   HANDLE tty = INVALID_HANDLE_VALUE;
-  HANDLE inf_stdin = INVALID_HANDLE_VALUE;
-  HANDLE inf_stdout = INVALID_HANDLE_VALUE;
-  HANDLE inf_stderr = INVALID_HANDLE_VALUE;
   bool redirected = false;
   char *w32env;
   char *temp;
This page took 0.082688 seconds and 4 git commands to generate.