From a1b7d1984a2ab493678efa1fa5c4cff683e61a71 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Thu, 6 May 2010 00:32:38 +0000 Subject: [PATCH] 2010-05-05 Michael Snyder * mi/mi-out.c (mi_table_begin): Delete unused variable. * mi/mi-cmd-var.c (print_varobj): Delete unused variable. (mi_cmd_var_list_children): Delete unused variable. (varobj_update_one): Delete unused variable. * mi/mi-cmd-break.c (mi_cmd_break_insert): Delete unused variables. * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals): Delete unused variable. (mi_cmd_stack_list_variables): Delete unused variable. (list_args_or_locals): Delete unused variable. * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file): Delete unused variables. (mi_cmd_file_list_exec_source_files): Delete unused variable. * mi/mi-cmd-target.c (mi_cmd_target_file_delete): Delete unused variable. * mi/mi-interp.c (mi_interpreter_exec): Delete unused variable. (mi_cmd_interpreter_exec): Delete unused variable. (mi_on_normal_stop): Delete unused variable. * mi/mi-main.c (run_one_inferior): Delete unused variable. (print_one_inferior): Delete unused variables. (mi_execute_command): Delete unused variable. (mi_cmd_execute): Delete unused variable. (timestamp): Delete unused variable. --- gdb/mi/mi-cmd-break.c | 3 --- gdb/mi/mi-cmd-file.c | 3 --- gdb/mi/mi-cmd-stack.c | 3 --- gdb/mi/mi-cmd-target.c | 2 +- gdb/mi/mi-cmd-var.c | 3 --- gdb/mi/mi-interp.c | 3 --- gdb/mi/mi-main.c | 20 ++++++++------------ gdb/mi/mi-out.c | 1 - 8 files changed, 9 insertions(+), 29 deletions(-) diff --git a/gdb/mi/mi-cmd-break.c b/gdb/mi/mi-cmd-break.c index ae83b98..dcb7ed9 100644 --- a/gdb/mi/mi-cmd-break.c +++ b/gdb/mi/mi-cmd-break.c @@ -66,7 +66,6 @@ void mi_cmd_break_insert (char *command, char **argv, int argc) { char *address = NULL; - enum bp_type type = REG_BP; int hardware = 0; int temp_p = 0; int thread = -1; @@ -77,8 +76,6 @@ mi_cmd_break_insert (char *command, char **argv, int argc) int tracepoint = 0; struct cleanup *back_to; - struct gdb_exception e; - struct gdb_events *old_hooks; enum opt { HARDWARE_OPT, TEMP_OPT, CONDITION_OPT, diff --git a/gdb/mi/mi-cmd-file.c b/gdb/mi/mi-cmd-file.c index c8f1a3b..5542eaa 100644 --- a/gdb/mi/mi-cmd-file.c +++ b/gdb/mi/mi-cmd-file.c @@ -34,8 +34,6 @@ void mi_cmd_file_list_exec_source_file (char *command, char **argv, int argc) { struct symtab_and_line st; - int optind = 0; - char *optarg; if (!mi_valid_noargs ("mi_cmd_file_list_exec_source_file", argc, argv)) error (_("mi_cmd_file_list_exec_source_file: Usage: No args")); @@ -83,7 +81,6 @@ void mi_cmd_file_list_exec_source_files (char *command, char **argv, int argc) { struct symtab *s; - struct partial_symtab *ps; struct objfile *objfile; if (!mi_valid_noargs ("mi_cmd_file_list_exec_source_files", argc, argv)) diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c index eb976c3..decc5f2 100644 --- a/gdb/mi/mi-cmd-stack.c +++ b/gdb/mi/mi-cmd-stack.c @@ -145,7 +145,6 @@ void mi_cmd_stack_list_locals (char *command, char **argv, int argc) { struct frame_info *frame; - enum print_values print_values; if (argc != 1) error (_("mi_cmd_stack_list_locals: Usage: PRINT_VALUES")); @@ -223,7 +222,6 @@ void mi_cmd_stack_list_variables (char *command, char **argv, int argc) { struct frame_info *frame; - enum print_values print_values; if (argc != 1) error (_("Usage: PRINT_VALUES")); @@ -244,7 +242,6 @@ list_args_or_locals (enum what_to_list what, int values, struct frame_info *fi) struct block *block; struct symbol *sym; struct dict_iterator iter; - int nsyms; struct cleanup *cleanup_list; static struct ui_stream *stb = NULL; struct type *type; diff --git a/gdb/mi/mi-cmd-target.c b/gdb/mi/mi-cmd-target.c index 887a450..0e5df21 100644 --- a/gdb/mi/mi-cmd-target.c +++ b/gdb/mi/mi-cmd-target.c @@ -76,7 +76,7 @@ mi_cmd_target_file_delete (char *command, char **argv, int argc) { int optind = 0; char *optarg; - const char *remote_file, *local_file; + const char *remote_file; static struct mi_opt opts[] = { { 0, 0, 0 } diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c index b227411..023bbb5 100644 --- a/gdb/mi/mi-cmd-var.c +++ b/gdb/mi/mi-cmd-var.c @@ -50,7 +50,6 @@ static void print_varobj (struct varobj *var, enum print_values print_values, int print_expression) { - struct type *gdb_type; char *type; int thread_id; char *display_hint; @@ -394,7 +393,6 @@ mi_cmd_var_list_children (char *command, char **argv, int argc) struct varobj *var; VEC(varobj_p) *children; struct varobj *child; - int numchild; enum print_values print_values; int ix; int from, to; @@ -712,7 +710,6 @@ static void varobj_update_one (struct varobj *var, enum print_values print_values, int explicit) { - struct varobj **cc; struct cleanup *cleanup = NULL; VEC (varobj_update_result) *changes; varobj_update_result *r; diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c index 33429c4..c6d7160 100644 --- a/gdb/mi/mi-interp.c +++ b/gdb/mi/mi-interp.c @@ -169,7 +169,6 @@ mi_interpreter_suspend (void *data) static struct gdb_exception mi_interpreter_exec (void *data, const char *command) { - static struct gdb_exception ok; char *tmp = alloca (strlen (command) + 1); strcpy (tmp, command); mi_execute_command_wrapper (tmp); @@ -188,7 +187,6 @@ mi_cmd_interpreter_exec (char *command, char **argv, int argc) { struct interp *interp_to_use; int i; - struct interp_procs *procs; char *mi_error_message = NULL; struct cleanup *old_chain; @@ -375,7 +373,6 @@ mi_on_normal_stop (struct bpstats *bs, int print_frame) using cli interpreter, be sure to use MI uiout for output, not the current one. */ struct ui_out *mi_uiout = interp_ui_out (top_level_interpreter ()); - struct mi_interp *mi = top_level_interpreter_data (); if (print_frame) { diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index 340ac68..0024830 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -358,8 +358,6 @@ mi_cmd_exec_interrupt (char *command, char **argv, int argc) static int run_one_inferior (struct inferior *inf, void *arg) { - struct thread_info *tp = 0; - if (inf->pid != 0) { if (inf->pid != ptid_get_pid (inferior_ptid)) @@ -559,8 +557,6 @@ print_one_inferior (struct inferior *inferior, void *xdata) if (!VEC_empty (int, data.cores)) { - int elt; - int i; int *b, *e; struct cleanup *back_to_2 = make_cleanup_ui_out_list_begin_end (uiout, "cores"); @@ -1702,7 +1698,6 @@ void mi_execute_command (char *cmd, int from_tty) { struct mi_parse *command; - struct ui_out *saved_uiout = uiout; /* This is to handle EOF (^D). We just quit gdb. */ /* FIXME: we should call some API function here. */ @@ -1793,7 +1788,6 @@ static void mi_cmd_execute (struct mi_parse *parse) { struct cleanup *cleanup; - int i; prepare_execute_command (); @@ -2027,7 +2021,6 @@ mi_load_progress (const char *section_name, static void timestamp (struct mi_timestamp *tv) { - long usec; gettimeofday (&tv->wallclock, NULL); #ifdef HAVE_GETRUSAGE getrusage (RUSAGE_SELF, &rusage); @@ -2036,11 +2029,14 @@ timestamp (struct mi_timestamp *tv) tv->stime.tv_sec = rusage.ru_stime.tv_sec; tv->stime.tv_usec = rusage.ru_stime.tv_usec; #else - usec = get_run_time (); - tv->utime.tv_sec = usec/1000000L; - tv->utime.tv_usec = usec - 1000000L*tv->utime.tv_sec; - tv->stime.tv_sec = 0; - tv->stime.tv_usec = 0; + { + long usec = get_run_time (); + + tv->utime.tv_sec = usec/1000000L; + tv->utime.tv_usec = usec - 1000000L*tv->utime.tv_sec; + tv->stime.tv_sec = 0; + tv->stime.tv_usec = 0; + } #endif } diff --git a/gdb/mi/mi-out.c b/gdb/mi/mi-out.c index 3613789..1e94175 100644 --- a/gdb/mi/mi-out.c +++ b/gdb/mi/mi-out.c @@ -106,7 +106,6 @@ mi_table_begin (struct ui_out *uiout, int nr_rows, const char *tblid) { - mi_out_data *data = ui_out_data (uiout); mi_open (uiout, tblid, ui_out_type_tuple); mi_field_int (uiout, -1/*fldno*/, -1/*width*/, -1/*alin*/, "nr_rows", nr_rows); -- 2.7.4