From 167e43849e8c76e720617fbb17897861ee1f2be0 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Thu, 6 May 2010 19:14:09 +0000 Subject: [PATCH] 2010-05-06 Michael Snyder * linespec.c (decode_compound): Delete unused variable. * dictionary.c (iterator_next_hashed): Delete unused variable. * infcall.c (call_function_by_hand): Delete unused variable. * infcmd.c (step_1): Delete unused variable. (registers_info): Delete unused variable. (attach_command): Delete unused variable. * infrun.c (follow_exec): Delete unused variable. (handle_step_into_function_backwards): Delete unused variable. (_initialize_infrun): Delete unused variable. * stack.c (parse_frame_specification_1): Delete unused variable. (frame_info): Delete unused variable. (backtrace_command_1): Delete unused variable. (catch_info): Delete unused variable. --- gdb/ChangeLog | 14 ++++++++++++++ gdb/dictionary.c | 1 - gdb/infcall.c | 1 - gdb/infcmd.c | 5 ----- gdb/infrun.c | 5 +---- gdb/linespec.c | 1 - gdb/stack.c | 9 +-------- 7 files changed, 16 insertions(+), 20 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9231de145a..5955cd15fd 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,19 @@ 2010-05-06 Michael Snyder + * linespec.c (decode_compound): Delete unused variable. + * dictionary.c (iterator_next_hashed): Delete unused variable. + * infcall.c (call_function_by_hand): Delete unused variable. + * infcmd.c (step_1): Delete unused variable. + (registers_info): Delete unused variable. + (attach_command): Delete unused variable. + * infrun.c (follow_exec): Delete unused variable. + (handle_step_into_function_backwards): Delete unused variable. + (_initialize_infrun): Delete unused variable. + * stack.c (parse_frame_specification_1): Delete unused variable. + (frame_info): Delete unused variable. + (backtrace_command_1): Delete unused variable. + (catch_info): Delete unused variable. + * eval.c (evaluate_subexp_standard): Delete unused variable. * valops.c (value_cast_pointers): Delete unused variable. (value_dynamic_cast): Delete unused variable. diff --git a/gdb/dictionary.c b/gdb/dictionary.c index b7996c940e..e3617cfb90 100644 --- a/gdb/dictionary.c +++ b/gdb/dictionary.c @@ -578,7 +578,6 @@ iterator_first_hashed (const struct dictionary *dict, static struct symbol * iterator_next_hashed (struct dict_iterator *iterator) { - const struct dictionary *dict = DICT_ITERATOR_DICT (iterator); struct symbol *next; next = DICT_ITERATOR_CURRENT (iterator)->hash_next; diff --git a/gdb/infcall.c b/gdb/infcall.c index b603cf601a..979d3eed2f 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -450,7 +450,6 @@ call_function_by_hand (struct value *function, int nargs, struct value **args) struct cleanup *terminate_bp_cleanup; ptid_t call_thread_ptid; struct gdb_exception e; - const char *name; char name_buf[RAW_FUNCTION_ADDRESS_SIZE]; if (TYPE_CODE (ftype) == TYPE_CODE_PTR) diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 16d32a661b..c3693b3fcb 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -832,7 +832,6 @@ static void step_1 (int skip_subroutines, int single_inst, char *count_string) { int count = 1; - struct frame_info *frame; struct cleanup *cleanups = make_cleanup (null_cleanup, NULL); int async_exec = 0; int thread = -1; @@ -1994,8 +1993,6 @@ registers_info (char *addr_exp, int fpregs) { struct frame_info *frame; struct gdbarch *gdbarch; - int regnum, numregs; - char *end; if (!target_has_registers) error (_("The program has no registers now.")); @@ -2356,8 +2353,6 @@ attach_command_continuation_free_args (void *args) void attach_command (char *args, int from_tty) { - char *exec_file; - char *full_exec_path = NULL; int async_exec = 0; struct cleanup *back_to = make_cleanup (null_cleanup, NULL); diff --git a/gdb/infrun.c b/gdb/infrun.c index 93f50eb94c..e79b634019 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -650,7 +650,6 @@ show_follow_exec_mode_string (struct ui_file *file, int from_tty, static void follow_exec (ptid_t pid, char *execd_pathname) { - struct target_ops *tgt; struct thread_info *th = inferior_thread (); struct inferior *inf = current_inferior (); @@ -726,7 +725,6 @@ follow_exec (ptid_t pid, char *execd_pathname) if (follow_exec_mode_string == follow_exec_mode_new) { struct program_space *pspace; - struct inferior *new_inf; /* The user wants to keep the old inferior and program spaces around. Create a new fresh one, and switch to it. */ @@ -4884,7 +4882,7 @@ handle_step_into_function_backward (struct gdbarch *gdbarch, struct execution_control_state *ecs) { struct symtab *s; - struct symtab_and_line stop_func_sal, sr_sal; + struct symtab_and_line stop_func_sal; s = find_pc_symtab (stop_pc); if (s && s->language != language_asm) @@ -6438,7 +6436,6 @@ _initialize_infrun (void) { int i; int numsigs; - struct cmd_list_element *c; add_info ("signals", signals_info, _("\ What debugger does when program gets various signals.\n\ diff --git a/gdb/linespec.c b/gdb/linespec.c index 8cd480e95f..d9721b49a6 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -1209,7 +1209,6 @@ decode_compound (char **argptr, int funfirstline, char ***canonical, struct symbol *sym; char *copy; struct symbol *sym_class; - struct symbol **sym_arr; struct type *t; char *saved_java_argptr = NULL; diff --git a/gdb/stack.c b/gdb/stack.c index 53d4aebb85..0632245400 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -865,9 +865,6 @@ parse_frame_specification_1 (const char *frame_exp, const char *message, numargs = 0; else { - char *addr_string; - struct cleanup *tmp_cleanup; - numargs = 0; while (1) { @@ -994,7 +991,7 @@ frame_info (char *addr_exp, int from_tty) struct symbol *func; struct symtab *s; struct frame_info *calling_frame_info; - int i, count, numregs; + int numregs; char *funname = 0; enum language funlang = language_unknown; const char *pc_regname; @@ -1314,8 +1311,6 @@ backtrace_command_1 (char *count_exp, int show_locals, int from_tty) if (info_verbose) { - struct partial_symtab *ps; - /* Read in symbols for all of the frames. Need to do this in a separate pass so that "Reading in symbols for xxx" messages don't screw up the appearance of the backtrace. Also if @@ -1693,8 +1688,6 @@ locals_info (char *args, int from_tty) static void catch_info (char *ignore, int from_tty) { - struct symtab_and_line *sal; - /* Assume g++ compiled code; old GDB 4.16 behaviour. */ print_frame_label_vars (get_selected_frame (_("No frame selected.")), 0, gdb_stdout); -- 2.34.1