From b5385fc0f02ffc78a7bcfbcfbcc7f5c57c48ea7e Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Thu, 6 May 2010 23:36:39 +0000 Subject: [PATCH] 2010-05-06 Michael Snyder * ada-lang.c (add_defn_to_vec): Delete unused variable. (decode_constrained_packed_array_type): Delete unused variable. (add_defn_to_vec): Delete unused variable. (symbol_completion_match): Delete unused variable. (value_tag_from_contents_and_address): Delete unused variable. (ada_evaluate_subexp): Delete unused variable. * c-lang.c (classify_type): Delete unused variable. * f-lang.c (f_printstr): Delete unused variable. * objc-lang.c (objc_printstr): Delete unused variable. * ada-tasks.c (get_known_tasks_addr): Delete unused variable. * jv-lang.c (type_from_class): ifdef unused variable. (java_class_name_from_physname): Delete unused variable. * m2-lang.c (m2_printstr): Delete unused variable. --- gdb/ChangeLog | 14 ++++++++++++++ gdb/ada-lang.c | 9 ++------- gdb/ada-tasks.c | 1 - gdb/c-lang.c | 1 - gdb/f-lang.c | 1 - gdb/jv-lang.c | 3 ++- gdb/m2-lang.c | 1 - gdb/objc-lang.c | 1 - 8 files changed, 18 insertions(+), 13 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 535908e29af..828bd577afd 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,19 @@ 2010-05-06 Michael Snyder + * ada-lang.c (add_defn_to_vec): Delete unused variable. + (decode_constrained_packed_array_type): Delete unused variable. + (add_defn_to_vec): Delete unused variable. + (symbol_completion_match): Delete unused variable. + (value_tag_from_contents_and_address): Delete unused variable. + (ada_evaluate_subexp): Delete unused variable. + * c-lang.c (classify_type): Delete unused variable. + * f-lang.c (f_printstr): Delete unused variable. + * objc-lang.c (objc_printstr): Delete unused variable. + * ada-tasks.c (get_known_tasks_addr): Delete unused variable. + * jv-lang.c (type_from_class): ifdef unused variable. + (java_class_name_from_physname): Delete unused variable. + * m2-lang.c (m2_printstr): Delete unused variable. + * objfiles.c (objfile_relocate): Delete unused variable. * maint.c (_initialize_maint_cmds): Delete unused variable. * demangle.c (_initialize_demangler): Delete unused variable. diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index f31d0750b03..f68825c91a5 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -1823,14 +1823,11 @@ constrained_packed_array_type (struct type *type, long *elt_bits) static struct type * decode_constrained_packed_array_type (struct type *type) { - struct symbol *sym; - struct block **blocks; char *raw_name = ada_type_name (ada_check_typedef (type)); char *name; char *tail; struct type *shadow_type; long bits; - int i, n; if (!raw_name) raw_name = ada_type_name (desc_base_type (type)); @@ -4050,7 +4047,6 @@ add_defn_to_vec (struct obstack *obstackp, struct block *block) { int i; - size_t tmp; struct ada_symbol_info *prevDefns = defns_collected (obstackp, 0); /* Do not try to complete stub types, as the debugger is probably @@ -5018,7 +5014,6 @@ symbol_completion_match (const char *sym_name, const char *text, int text_len, int wild_match, int encoded) { - char *result; const int verbatim_match = (text[0] == '<'); int match = 0; @@ -5409,7 +5404,7 @@ value_tag_from_contents_and_address (struct type *type, const gdb_byte *valaddr, CORE_ADDR address) { - int tag_byte_offset, dummy1, dummy2; + int tag_byte_offset; struct type *tag_type; if (find_struct_field ("_tag", type, 0, &tag_type, &tag_byte_offset, NULL, NULL, NULL)) @@ -8575,7 +8570,7 @@ ada_evaluate_subexp (struct type *expect_type, struct expression *exp, int *pos, enum noside noside) { enum exp_opcode op; - int tem, tem2, tem3; + int tem; int pc; struct value *arg1 = NULL, *arg2 = NULL, *arg3; struct type *type; diff --git a/gdb/ada-tasks.c b/gdb/ada-tasks.c index 519cfc62ba7..f57f44ff96e 100644 --- a/gdb/ada-tasks.c +++ b/gdb/ada-tasks.c @@ -293,7 +293,6 @@ get_known_tasks_addr (void) if (ada_tasks_check_symbol_table) { - struct symbol *sym; struct minimal_symbol *msym; msym = lookup_minimal_symbol (KNOWN_TASKS_NAME, NULL, NULL); diff --git a/gdb/c-lang.c b/gdb/c-lang.c index aa69f94e8da..305c549caaa 100644 --- a/gdb/c-lang.c +++ b/gdb/c-lang.c @@ -76,7 +76,6 @@ static enum c_string_type classify_type (struct type *elttype, struct gdbarch *gdbarch, const char **encoding) { - struct type *saved_type; enum c_string_type result; /* We loop because ELTTYPE may be a typedef, and we want to diff --git a/gdb/f-lang.c b/gdb/f-lang.c index 0bee8f50e80..0b860354d45 100644 --- a/gdb/f-lang.c +++ b/gdb/f-lang.c @@ -150,7 +150,6 @@ f_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string, unsigned int things_printed = 0; int in_quotes = 0; int need_comma = 0; - int width = TYPE_LENGTH (type); if (length == 0) { diff --git a/gdb/jv-lang.c b/gdb/jv-lang.c index b9117246bf1..e8d12cd5267 100644 --- a/gdb/jv-lang.c +++ b/gdb/jv-lang.c @@ -268,8 +268,10 @@ type_from_class (struct gdbarch *gdbarch, struct value *clas) struct value *utf8_name; char *nptr; CORE_ADDR addr; +#if 0 struct block *bl; struct dict_iterator iter; +#endif int is_array = 0; type = check_typedef (value_type (clas)); @@ -1053,7 +1055,6 @@ java_class_name_from_physname (const char *physname) { char *ret = NULL; const char *end; - int depth = 0; char *demangled_name = java_demangle (physname, DMGL_PARAMS | DMGL_ANSI); if (demangled_name == NULL) diff --git a/gdb/m2-lang.c b/gdb/m2-lang.c index 30577744170..9cc64bc5893 100644 --- a/gdb/m2-lang.c +++ b/gdb/m2-lang.c @@ -111,7 +111,6 @@ m2_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string, unsigned int things_printed = 0; int in_quotes = 0; int need_comma = 0; - int width = TYPE_LENGTH (type); if (length == 0) { diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c index 1731fa72012..b8cd18b7048 100644 --- a/gdb/objc-lang.c +++ b/gdb/objc-lang.c @@ -350,7 +350,6 @@ objc_printstr (struct ui_file *stream, struct type *type, unsigned int things_printed = 0; int in_quotes = 0; int need_comma = 0; - int width = TYPE_LENGTH (type); /* If the string was not truncated due to `set print elements', and the last byte of it is a null, we don't print that, in -- 2.30.2