From 8ea13695588ac6e6b67bf721e61bb4d277d07089 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Thu, 6 May 2010 18:07:08 +0000 Subject: [PATCH] 2010-05-06 Michael Snyder * auxv.c (target_auxv_search): Delete unused variable. * blockframe.c (get_frame_block): Delete unused variable. * regcache.c (regcache_cpy): Delete unused variable. (regcache_cpy_no_passthrough): Delete unused variable. * charset.c (wchar_iterate): Delete unused variable. (find_charset_names): Delete unused variable. (_initialize_charset): Delete unused variable. * disasm.c (do_mixed_source_and_assembly): Delete unused variable. * source.c (set_default_source_symtab_and_line): Delete unused variable. (set_substitute_path_command): Delete unused variable. * value.c (preserve_values): Delete unused variable. (value_from_double): Delete unused variable. --- gdb/ChangeLog | 17 +++++++++++++++++ gdb/auxv.c | 1 - gdb/blockframe.c | 1 - gdb/charset.c | 5 +---- gdb/disasm.c | 1 - gdb/regcache.c | 4 ---- gdb/source.c | 3 --- gdb/value.c | 2 -- 8 files changed, 18 insertions(+), 16 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bf71acd..5bd0388 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,20 @@ +2010-05-06 Michael Snyder + + * auxv.c (target_auxv_search): Delete unused variable. + * blockframe.c (get_frame_block): Delete unused variable. + * regcache.c (regcache_cpy): Delete unused variable. + (regcache_cpy_no_passthrough): Delete unused variable. + * charset.c (wchar_iterate): Delete unused variable. + (find_charset_names): Delete unused variable. + (_initialize_charset): Delete unused variable. + * disasm.c (do_mixed_source_and_assembly): + Delete unused variable. + * source.c (set_default_source_symtab_and_line): + Delete unused variable. + (set_substitute_path_command): Delete unused variable. + * value.c (preserve_values): Delete unused variable. + (value_from_double): Delete unused variable. + 2010-05-05 Michael Snyder * psymtab.c (lookup_partial_symbol): Delete unused variable. diff --git a/gdb/auxv.c b/gdb/auxv.c index cf2dc7d..8e9e939 100644 --- a/gdb/auxv.c +++ b/gdb/auxv.c @@ -258,7 +258,6 @@ target_auxv_search (struct target_ops *ops, CORE_ADDR match, CORE_ADDR *valp) gdb_byte *data; LONGEST n = target_read_alloc (ops, TARGET_OBJECT_AUXV, NULL, &data); gdb_byte *ptr = data; - int ents = 0; if (n <= 0) return n; diff --git a/gdb/blockframe.c b/gdb/blockframe.c index 30f2a32..a9550b4 100644 --- a/gdb/blockframe.c +++ b/gdb/blockframe.c @@ -59,7 +59,6 @@ struct block * get_frame_block (struct frame_info *frame, CORE_ADDR *addr_in_block) { const CORE_ADDR pc = get_frame_address_in_block (frame); - struct frame_info *next_frame; struct block *bl; int inline_count; diff --git a/gdb/charset.c b/gdb/charset.c index c422056..fadd232 100644 --- a/gdb/charset.c +++ b/gdb/charset.c @@ -634,7 +634,6 @@ wchar_iterate (struct wchar_iterator *iter, size_t orig_in = iter->bytes; size_t out_avail = out_request * sizeof (gdb_wchar_t); size_t num; - gdb_wchar_t result; size_t r = iconv (iter->desc, (ICONV_CONST char **) &iter->input, &iter->bytes, @@ -814,7 +813,7 @@ find_charset_names (void) /* The size of buf is chosen arbitrarily. */ char buf[1024]; char *start, *r; - int len, keep_going; + int len; r = fgets (buf, sizeof (buf), in); if (!r) @@ -909,8 +908,6 @@ default_auto_wide_charset (void) void _initialize_charset (void) { - struct cmd_list_element *new_cmd; - /* The first element is always "auto". */ VEC_safe_push (char_ptr, charsets, xstrdup ("auto")); find_charset_names (); diff --git a/gdb/disasm.c b/gdb/disasm.c index a3fe89a..dd0f539 100644 --- a/gdb/disasm.c +++ b/gdb/disasm.c @@ -180,7 +180,6 @@ do_mixed_source_and_assembly (struct gdbarch *gdbarch, struct ui_out *uiout, int i; int out_of_order = 0; int next_line = 0; - CORE_ADDR pc; int num_displayed = 0; struct cleanup *ui_out_chain; struct cleanup *ui_out_tuple_chain = make_cleanup (null_cleanup, 0); diff --git a/gdb/regcache.c b/gdb/regcache.c index c3fcd9d..6c91da3 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -350,9 +350,6 @@ do_cooked_read (void *src, int regnum, gdb_byte *buf) void regcache_cpy (struct regcache *dst, struct regcache *src) { - int i; - gdb_byte *buf; - gdb_assert (src != NULL && dst != NULL); gdb_assert (src->descr->gdbarch == dst->descr->gdbarch); gdb_assert (src != dst); @@ -369,7 +366,6 @@ regcache_cpy (struct regcache *dst, struct regcache *src) void regcache_cpy_no_passthrough (struct regcache *dst, struct regcache *src) { - int i; gdb_assert (src != NULL && dst != NULL); gdb_assert (src->descr->gdbarch == dst->descr->gdbarch); /* NOTE: cagney/2002-05-17: Don't let the caller do a no-passthrough diff --git a/gdb/source.c b/gdb/source.c index 47caa14..210a0e0 100644 --- a/gdb/source.c +++ b/gdb/source.c @@ -176,8 +176,6 @@ get_current_source_symtab_and_line (void) void set_default_source_symtab_and_line (void) { - struct symtab_and_line cursal; - if (!have_full_symbols () && !have_partial_symbols ()) error (_("No symbol table is loaded. Use the \"file\" command.")); @@ -1874,7 +1872,6 @@ unset_substitute_path_command (char *args, int from_tty) static void set_substitute_path_command (char *args, int from_tty) { - char *from_path, *to_path; char **argv; struct substitute_path_rule *rule; diff --git a/gdb/value.c b/gdb/value.c index 19386b6..2f1ae7a 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -1481,7 +1481,6 @@ preserve_values (struct objfile *objfile) htab_t copied_types; struct value_history_chunk *cur; struct internalvar *var; - struct value *val; int i; /* Create the hash table. We allocate on the objfile's obstack, since @@ -2243,7 +2242,6 @@ value_from_double (struct type *type, DOUBLEST num) struct value *val = allocate_value (type); struct type *base_type = check_typedef (type); enum type_code code = TYPE_CODE (base_type); - int len = TYPE_LENGTH (base_type); if (code == TYPE_CODE_FLT) { -- 2.7.4