aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksandar Ristovski <aristovski@qnx.com>2013-01-31 18:37:39 +0000
committerAleksandar Ristovski <aristovski@qnx.com>2013-01-31 18:37:39 +0000
commit5799c0b96918061a27fd0be85177aeac9d8fe71e (patch)
tree0e5c8752b019c7f840b631394009b0d512d23c71
parentc656bca57874f367618b35767e5bfc35545c7b1d (diff)
downloadgdb-5799c0b96918061a27fd0be85177aeac9d8fe71e.zip
gdb-5799c0b96918061a27fd0be85177aeac9d8fe71e.tar.gz
gdb-5799c0b96918061a27fd0be85177aeac9d8fe71e.tar.bz2
2013-01-31 Aleksandar Ristovski <aristovski@qnx.com>
* charset.c (intermediate_encoding): Remove unused i. * completer.c (signal_completer): Remove unused i. * continuations.c (discard_my_continuations_1): Remove unused continuation_ptr. * corelow.c (core_close): Remove unuseD name. (get_core_siginfo): Remove unused pid. * cp-namespace.c (cp_lookup_symbol_imports_or_template): Remove unused i, cps. * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove unused base_offset. (loclist_describe_location): Remove unused first. * event-top.c (command_line_handler): Remove unused got_eof. * exec.c (exec_close_1): Remove unused need_symtab_cleanup. (resize_section_table): Remove unused old_value. * gdb_bfd.c (gdb_bfd_map_section): Remove unused header. * gnu-v3-abi.c (compute_vtable_size): Remove unused addr. * i386-tdep.c (i386_process_record): Remove unused rex. * infcmd.c (get_return_value): Remove unused uiout. * jv-lang.c (type_from_class): Remove unused is_array. * jv-valprint.c (java_val_print): Remove unused i. * linux-nat.c (linux_nat_stop_lwp): Remove unused ptid. * linux-thread-db.c (thread_db_find_new_threads_2): Remove unuseD pid. * m2-typeprint.c (m2_print_type): Remove unused code. * macroexp.c (get_character_constant): Remove unused body_start. (macro_stringify): Remove unused result. * objc-lang.c (find_methods): Remove unused gdbarch. * objfiles.c (filter_overlapping_sections): Remove unused abfd1, abfd2. * regcache.c (regcache_cooked_read): Remove unused gdbarch. * stack.c (print_frame_args): Remove unused summary. * thread.c (thread_apply_command): Remove unused p. * valarith.c (value_x_unop): Remove unused mangle_ptr. * valops.c (search_struct_method): Remove unused skip. * valprint.c (generic_val_print): Remove unused byte_order. * varobj.c (varobj_update): Remove unused changed. * cli/cli-cmds.c (complete_command): Remove unused next_item. (alias_command): Remove unused c. * mi/mi-cmd-catch.c (mi_catch_load_unload): Remove unused c. * mi/mi-main.c (mi_cmd_data_write_register_values): Remove unused format. (mi_cmd_data_write_memory): Remove unused word_format. (mi_cmd_data_write_memory_bytes): Remove unused r. * python/py-gdb-readline.c (gdbpy_readline_wrapper): Remove unused p_start, p_end. * python/python.c (_initialize_python): Remove unused cmd_name, cmd. * tui/tui-disasm.c (tui_set_disassem_content): Remove unused line_width. Reference: http://sourceware.org/ml/gdb-patches/2013-01/msg00766.html
-rw-r--r--gdb/ChangeLog48
-rw-r--r--gdb/charset.c1
-rw-r--r--gdb/cli/cli-cmds.c3
-rw-r--r--gdb/completer.c1
-rw-r--r--gdb/continuations.c2
-rw-r--r--gdb/corelow.c3
-rw-r--r--gdb/cp-namespace.c4
-rw-r--r--gdb/dwarf2loc.c2
-rw-r--r--gdb/event-top.c3
-rw-r--r--gdb/exec.c8
-rw-r--r--gdb/gdb_bfd.c1
-rw-r--r--gdb/gnu-v3-abi.c1
-rw-r--r--gdb/i386-tdep.c2
-rw-r--r--gdb/infcmd.c1
-rw-r--r--gdb/jv-lang.c2
-rw-r--r--gdb/jv-valprint.c1
-rw-r--r--gdb/linux-nat.c2
-rw-r--r--gdb/linux-thread-db.c1
-rw-r--r--gdb/m2-typeprint.c3
-rw-r--r--gdb/macroexp.c3
-rw-r--r--gdb/mi/mi-cmd-catch.c1
-rw-r--r--gdb/mi/mi-main.c9
-rw-r--r--gdb/objc-lang.c2
-rw-r--r--gdb/objfiles.c3
-rw-r--r--gdb/python/py-gdb-readline.c2
-rw-r--r--gdb/python/python.c2
-rw-r--r--gdb/regcache.c2
-rw-r--r--gdb/stack.c2
-rw-r--r--gdb/thread.c1
-rw-r--r--gdb/tui/tui-disasm.c4
-rw-r--r--gdb/valarith.c3
-rw-r--r--gdb/valops.c1
-rw-r--r--gdb/valprint.c1
-rw-r--r--gdb/varobj.c1
34 files changed, 53 insertions, 73 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 10da404..f968d2a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,53 @@
2013-01-31 Aleksandar Ristovski <aristovski@qnx.com>
+ * charset.c (intermediate_encoding): Remove unused i.
+ * completer.c (signal_completer): Remove unused i.
+ * continuations.c (discard_my_continuations_1): Remove unused
+ continuation_ptr.
+ * corelow.c (core_close): Remove unuseD name.
+ (get_core_siginfo): Remove unused pid.
+ * cp-namespace.c (cp_lookup_symbol_imports_or_template): Remove unused
+ i, cps.
+ * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove unused base_offset.
+ (loclist_describe_location): Remove unused first.
+ * event-top.c (command_line_handler): Remove unused got_eof.
+ * exec.c (exec_close_1): Remove unused need_symtab_cleanup.
+ (resize_section_table): Remove unused old_value.
+ * gdb_bfd.c (gdb_bfd_map_section): Remove unused header.
+ * gnu-v3-abi.c (compute_vtable_size): Remove unused addr.
+ * i386-tdep.c (i386_process_record): Remove unused rex.
+ * infcmd.c (get_return_value): Remove unused uiout.
+ * jv-lang.c (type_from_class): Remove unused is_array.
+ * jv-valprint.c (java_val_print): Remove unused i.
+ * linux-nat.c (linux_nat_stop_lwp): Remove unused ptid.
+ * linux-thread-db.c (thread_db_find_new_threads_2): Remove unuseD pid.
+ * m2-typeprint.c (m2_print_type): Remove unused code.
+ * macroexp.c (get_character_constant): Remove unused body_start.
+ (macro_stringify): Remove unused result.
+ * objc-lang.c (find_methods): Remove unused gdbarch.
+ * objfiles.c (filter_overlapping_sections): Remove unused abfd1, abfd2.
+ * regcache.c (regcache_cooked_read): Remove unused gdbarch.
+ * stack.c (print_frame_args): Remove unused summary.
+ * thread.c (thread_apply_command): Remove unused p.
+ * valarith.c (value_x_unop): Remove unused mangle_ptr.
+ * valops.c (search_struct_method): Remove unused skip.
+ * valprint.c (generic_val_print): Remove unused byte_order.
+ * varobj.c (varobj_update): Remove unused changed.
+ * cli/cli-cmds.c (complete_command): Remove unused next_item.
+ (alias_command): Remove unused c.
+ * mi/mi-cmd-catch.c (mi_catch_load_unload): Remove unused c.
+ * mi/mi-main.c (mi_cmd_data_write_register_values): Remove unused
+ format.
+ (mi_cmd_data_write_memory): Remove unused word_format.
+ (mi_cmd_data_write_memory_bytes): Remove unused r.
+ * python/py-gdb-readline.c (gdbpy_readline_wrapper): Remove unused
+ p_start, p_end.
+ * python/python.c (_initialize_python): Remove unused cmd_name, cmd.
+ * tui/tui-disasm.c (tui_set_disassem_content): Remove unused
+ line_width.
+
+2013-01-31 Aleksandar Ristovski <aristovski@qnx.com>
+
* dwarf2-frame.c (dwarf2_compile_cfa_to_ax): Remove unused num_regs.
* symtab.c (iterate_over_symtabs): Remove unused s.
(find_pc_sect_symtab): Remove unused pspAce.
diff --git a/gdb/charset.c b/gdb/charset.c
index 6372224..165f90f 100644
--- a/gdb/charset.c
+++ b/gdb/charset.c
@@ -965,7 +965,6 @@ intermediate_encoding (void)
iconv_t desc;
static const char *stored_result = NULL;
char *result;
- int i;
if (stored_result)
return stored_result;
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 3a58c1b..50d9de7 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -285,8 +285,6 @@ complete_command (char *arg, int from_tty)
unique item once. */
for (ix = 0; VEC_iterate (char_ptr, completions, ix, item); ++ix)
{
- int next_item;
-
if (prev == NULL || strcmp (item, prev) != 0)
{
printf_unfiltered ("%s%s\n", arg_prefix, item);
@@ -1323,7 +1321,6 @@ alias_command (char *args, int from_tty)
char *args2, *equals, *alias, *command;
char **alias_argv, **command_argv;
dyn_string_t alias_dyn_string, command_dyn_string;
- struct cmd_list_element *c;
static const char usage[] = N_("Usage: alias [-a] [--] ALIAS = COMMAND");
if (args == NULL || strchr (args, '=') == NULL)
diff --git a/gdb/completer.c b/gdb/completer.c
index 9937b4c..969d015 100644
--- a/gdb/completer.c
+++ b/gdb/completer.c
@@ -787,7 +787,6 @@ VEC (char_ptr) *
signal_completer (struct cmd_list_element *ignore,
char *text, char *word)
{
- int i;
VEC (char_ptr) *return_val = NULL;
size_t len = strlen (word);
enum gdb_signal signum;
diff --git a/gdb/continuations.c b/gdb/continuations.c
index a7d8a7a..2dfbbb3 100644
--- a/gdb/continuations.c
+++ b/gdb/continuations.c
@@ -100,8 +100,6 @@ discard_my_continuations_1 (struct continuation **pmy_chain)
static void
discard_my_continuations (struct continuation **list)
{
- struct continuation *continuation_ptr = *list;
-
discard_my_continuations_1 (list);
*list = NULL;
}
diff --git a/gdb/corelow.c b/gdb/corelow.c
index 121c846..a98ae54 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -194,8 +194,6 @@ gdb_check_format (bfd *abfd)
static void
core_close (int quitting)
{
- char *name;
-
if (core_bfd)
{
int pid = ptid_get_pid (inferior_ptid);
@@ -664,7 +662,6 @@ static LONGEST
get_core_siginfo (bfd *abfd, gdb_byte *readbuf, ULONGEST offset, LONGEST len)
{
asection *section;
- long pid;
char *section_name;
const char *name = ".note.linuxcore.siginfo";
diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c
index c137eec..279021e 100644
--- a/gdb/cp-namespace.c
+++ b/gdb/cp-namespace.c
@@ -451,10 +451,6 @@ cp_lookup_symbol_imports_or_template (const char *scope,
if (function != NULL && SYMBOL_LANGUAGE (function) == language_cplus)
{
- int i;
- struct cplus_specific *cps
- = function->ginfo.language_specific.cplus_specific;
-
/* Search the function's template parameters. */
if (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION (function))
{
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index 62d0098..002387e 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -2865,7 +2865,6 @@ dwarf2_compile_expr_to_ax (struct agent_expr *expr, struct axs_value *loc,
size_t datalen;
struct block *b;
struct symbol *framefunc;
- LONGEST base_offset = 0;
b = block_for_pc (expr->scope);
@@ -4051,7 +4050,6 @@ loclist_describe_location (struct symbol *symbol, CORE_ADDR addr,
{
struct dwarf2_loclist_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
const gdb_byte *loc_ptr, *buf_end;
- int first = 1;
struct objfile *objfile = dwarf2_per_cu_objfile (dlbaton->per_cu);
struct gdbarch *gdbarch = get_objfile_arch (objfile);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
diff --git a/gdb/event-top.c b/gdb/event-top.c
index 9f415b2..6f3dfab 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -453,8 +453,6 @@ command_line_handler (char *rl)
char *p;
char *p1;
char *nline;
- char got_eof = 0;
-
int repeat = (instream == stdin);
if (annotation_level > 1 && instream == stdin)
@@ -499,7 +497,6 @@ command_line_handler (char *rl)
and exit from gdb. */
if (!rl || rl == (char *) EOF)
{
- got_eof = 1;
command_handler (0);
return; /* Lint. */
}
diff --git a/gdb/exec.c b/gdb/exec.c
index 7b2e95d..221e679 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -117,7 +117,6 @@ exec_close (void)
static void
exec_close_1 (int quitting)
{
- int need_symtab_cleanup = 0;
struct vmap *vp, *nxt;
using_exec_ops = 0;
@@ -128,10 +127,7 @@ exec_close_1 (int quitting)
nxt = vp->nxt;
if (vp->objfile)
- {
- free_objfile (vp->objfile);
- need_symtab_cleanup = 1;
- }
+ free_objfile (vp->objfile);
gdb_bfd_unref (vp->bfd);
@@ -391,11 +387,9 @@ add_to_section_table (bfd *abfd, struct bfd_section *asect,
int
resize_section_table (struct target_section_table *table, int num_added)
{
- struct target_section *old_value;
int old_count;
int new_count;
- old_value = table->sections;
old_count = table->sections_end - table->sections;
new_count = num_added + old_count;
diff --git a/gdb/gdb_bfd.c b/gdb/gdb_bfd.c
index ae561d3..d4540b9 100644
--- a/gdb/gdb_bfd.c
+++ b/gdb/gdb_bfd.c
@@ -345,7 +345,6 @@ const gdb_byte *
gdb_bfd_map_section (asection *sectp, bfd_size_type *size)
{
bfd *abfd;
- unsigned char header[4];
struct gdb_bfd_section_data *descriptor;
bfd_byte *data;
diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c
index 641b2b1..3265663 100644
--- a/gdb/gnu-v3-abi.c
+++ b/gdb/gnu-v3-abi.c
@@ -805,7 +805,6 @@ compute_vtable_size (htab_t offset_hash,
struct type *type = check_typedef (value_type (value));
void **slot;
struct value_and_voffset search_vo, *current_vo;
- CORE_ADDR addr = value_address (value) + value_embedded_offset (value);
/* If the object is not dynamic, then we are done; as it cannot have
dynamic base types either. */
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index df077bc..637c44d 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -4339,7 +4339,6 @@ i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
gdb_byte buf[MAX_REGISTER_SIZE];
struct i386_record_s ir;
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- int rex = 0;
uint8_t rex_w = -1;
uint8_t rex_r = 0;
@@ -4419,7 +4418,6 @@ i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
if (ir.regmap[X86_RECORD_R8_REGNUM]) /* 64 bit target */
{
/* REX */
- rex = 1;
rex_w = (opcode8 >> 3) & 1;
rex_r = (opcode8 & 0x4) << 1;
ir.rex_x = (opcode8 & 0x2) << 2;
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index fb34ae4..f7ce69a 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -1450,7 +1450,6 @@ get_return_value (struct value *function, struct type *value_type)
struct regcache *stop_regs = stop_registers;
struct gdbarch *gdbarch;
struct value *value;
- struct ui_out *uiout = current_uiout;
struct cleanup *cleanup = make_cleanup (null_cleanup, NULL);
/* If stop_registers were not saved, use the current registers. */
diff --git a/gdb/jv-lang.c b/gdb/jv-lang.c
index f8e8718..48b5b3c 100644
--- a/gdb/jv-lang.c
+++ b/gdb/jv-lang.c
@@ -269,7 +269,6 @@ type_from_class (struct gdbarch *gdbarch, struct value *clas)
struct value *utf8_name;
char *nptr;
CORE_ADDR addr;
- int is_array = 0;
type = check_typedef (value_type (clas));
if (TYPE_CODE (type) == TYPE_CODE_PTR)
@@ -318,7 +317,6 @@ type_from_class (struct gdbarch *gdbarch, struct value *clas)
name = obstack_alloc (&objfile->objfile_obstack, namelen + 1);
java_demangled_signature_copy (name, signature);
name[namelen] = '\0';
- is_array = 1;
temp = clas;
/* Set array element type. */
temp = value_struct_elt (&temp, NULL, "methods", NULL, "structure");
diff --git a/gdb/jv-valprint.c b/gdb/jv-valprint.c
index 619aa3f..6cdceb0 100644
--- a/gdb/jv-valprint.c
+++ b/gdb/jv-valprint.c
@@ -471,7 +471,6 @@ java_val_print (struct type *type, const gdb_byte *valaddr,
const struct value_print_options *options)
{
struct gdbarch *gdbarch = get_type_arch (type);
- unsigned int i = 0; /* Number of characters printed. */
struct type *target_type;
CORE_ADDR addr;
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index e9438b5..57bca11 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -4976,8 +4976,6 @@ linux_nat_stop_lwp (struct lwp_info *lwp, void *data)
{
if (!lwp->stopped)
{
- ptid_t ptid = lwp->ptid;
-
if (debug_linux_nat)
fprintf_unfiltered (gdb_stdlog,
"LNSL: running -> suspending %s\n",
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index 0e4b0ac..e3d893a 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -1661,7 +1661,6 @@ thread_db_find_new_threads_2 (ptid_t ptid, int until_no_new)
{
td_err_e err = TD_OK;
struct thread_db_info *info;
- int pid = ptid_get_pid (ptid);
int i, loop;
info = get_thread_db_info (GET_PID (ptid));
diff --git a/gdb/m2-typeprint.c b/gdb/m2-typeprint.c
index 1fd2206..653cb77 100644
--- a/gdb/m2-typeprint.c
+++ b/gdb/m2-typeprint.c
@@ -77,8 +77,6 @@ m2_print_type (struct type *type, const char *varstring,
int show, int level,
const struct type_print_options *flags)
{
- enum type_code code;
-
CHECK_TYPEDEF (type);
QUIT;
@@ -90,7 +88,6 @@ m2_print_type (struct type *type, const char *varstring,
return;
}
- code = TYPE_CODE (type);
switch (TYPE_CODE (type))
{
case TYPE_CODE_SET:
diff --git a/gdb/macroexp.c b/gdb/macroexp.c
index f00bbba..d88dac3 100644
--- a/gdb/macroexp.c
+++ b/gdb/macroexp.c
@@ -337,7 +337,6 @@ get_character_constant (struct macro_buffer *tok, char *p, char *end)
&& p[1] == '\''))
{
char *tok_start = p;
- char *body_start;
int char_count = 0;
if (*p == '\'')
@@ -347,7 +346,6 @@ get_character_constant (struct macro_buffer *tok, char *p, char *end)
else
gdb_assert_not_reached ("unexpected character constant");
- body_start = p;
for (;;)
{
if (p >= end)
@@ -700,7 +698,6 @@ macro_stringify (const char *str)
{
struct macro_buffer buffer;
int len = strlen (str);
- char *result;
init_buffer (&buffer, len);
stringify (&buffer, str, len);
diff --git a/gdb/mi/mi-cmd-catch.c b/gdb/mi/mi-cmd-catch.c
index 067171b..cd932fe 100644
--- a/gdb/mi/mi-cmd-catch.c
+++ b/gdb/mi/mi-cmd-catch.c
@@ -33,7 +33,6 @@
static void
mi_catch_load_unload (int load, char *argv[], int argc)
{
- struct solib_catchpoint *c;
struct cleanup *back_to;
const char *actual_cmd = load ? "-catch-load" : "-catch-unload";
int temp = 0;
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index d5e0660..28de126 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -1189,7 +1189,6 @@ mi_cmd_data_write_register_values (char *command, char **argv, int argc)
struct regcache *regcache;
struct gdbarch *gdbarch;
int numregs, i;
- char format;
/* Note that the test for a valid register must include checking the
gdbarch_register_name because gdbarch_num_regs may be allocated
@@ -1206,8 +1205,6 @@ mi_cmd_data_write_register_values (char *command, char **argv, int argc)
error (_("-data-write-register-values: Usage: -data-write-register-"
"values <format> [<regnum1> <value1>...<regnumN> <valueN>]"));
- format = (int) argv[0][0];
-
if (!target_has_registers)
error (_("-data-write-register-values: No registers."));
@@ -1588,7 +1585,6 @@ mi_cmd_data_write_memory (char *command, char **argv, int argc)
struct gdbarch *gdbarch = get_current_arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR addr;
- char word_format;
long word_size;
/* FIXME: ezannoni 2000-02-17 LONGEST could possibly not be big
enough when using a compiler other than GCC. */
@@ -1632,9 +1628,6 @@ mi_cmd_data_write_memory (char *command, char **argv, int argc)
/* Extract all the arguments. */
/* Start address of the memory dump. */
addr = parse_and_eval_address (argv[0]);
- /* The format character to use when displaying a memory word. See
- the ``x'' command. */
- word_format = argv[1][0];
/* The size of the memory word. */
word_size = atol (argv[2]);
@@ -1666,7 +1659,7 @@ mi_cmd_data_write_memory_bytes (char *command, char **argv, int argc)
char *cdata;
gdb_byte *data;
gdb_byte *databuf;
- size_t len, r, i, steps, remainder;
+ size_t len, i, steps, remainder;
long int count, j;
struct cleanup *back_to;
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index 2f05b58..d4928ab 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -996,8 +996,6 @@ find_methods (char type, const char *class, const char *category,
ALL_OBJFILE_MSYMBOLS (objfile, msymbol)
{
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
-
QUIT;
/* Check the symbol name first as this can be done entirely without
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 0f14f8f..5232c8f 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -1234,9 +1234,6 @@ filter_overlapping_sections (struct obj_section **map, int map_size)
struct objfile *const objf1 = sect1->objfile;
struct objfile *const objf2 = sect2->objfile;
- const struct bfd *const abfd1 = objf1->obfd;
- const struct bfd *const abfd2 = objf2->obfd;
-
const struct bfd_section *const bfds1 = sect1->the_bfd_section;
const struct bfd_section *const bfds2 = sect2->the_bfd_section;
diff --git a/gdb/python/py-gdb-readline.c b/gdb/python/py-gdb-readline.c
index 2a89408..ca7e4a6 100644
--- a/gdb/python/py-gdb-readline.c
+++ b/gdb/python/py-gdb-readline.c
@@ -37,7 +37,7 @@ gdbpy_readline_wrapper (FILE *sys_stdin, FILE *sys_stdout,
char *prompt)
{
int n;
- char *p = NULL, *p_start, *p_end, *q;
+ char *p = NULL, *q;
volatile struct gdb_exception except;
TRY_CATCH (except, RETURN_MASK_ALL)
diff --git a/gdb/python/python.c b/gdb/python/python.c
index 53ddee9..8dd65a1 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -1436,8 +1436,6 @@ extern initialize_file_ftype _initialize_python;
void
_initialize_python (void)
{
- char *cmd_name;
- struct cmd_list_element *cmd;
char *progname;
#ifdef IS_PY3K
int i;
diff --git a/gdb/regcache.c b/gdb/regcache.c
index 1bad089..d413fe8 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -706,8 +706,6 @@ regcache_cooked_read (struct regcache *regcache, int regnum, gdb_byte *buf)
{
/* Read-only register cache, perhaps the cooked value was
cached? */
- struct gdbarch *gdbarch = regcache->descr->gdbarch;
-
if (regcache->register_status[regnum] == REG_VALID)
memcpy (buf, register_buffer (regcache, regnum),
regcache->descr->sizeof_register[regnum]);
diff --git a/gdb/stack.c b/gdb/stack.c
index a9dabb5..c8a6a7e 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -504,8 +504,6 @@ print_frame_args (struct symbol *func, struct frame_info *frame,
struct ui_file *stb;
/* True if we should print arguments, false otherwise. */
int print_args = strcmp (print_frame_arguments, "none");
- /* True in "summary" mode, false otherwise. */
- int summary = !strcmp (print_frame_arguments, "scalars");
stb = mem_fileopen ();
old_chain = make_cleanup_ui_file_delete (stb);
diff --git a/gdb/thread.c b/gdb/thread.c
index 8e85727..6b53c7a 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -1233,7 +1233,6 @@ thread_apply_command (char *tidlist, int from_tty)
{
struct thread_info *tp;
int start;
- char *p = tidlist;
start = get_number_or_range (&state);
diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c
index 43fc52f..60177fe 100644
--- a/gdb/tui/tui-disasm.c
+++ b/gdb/tui/tui-disasm.c
@@ -173,7 +173,7 @@ tui_set_disassem_content (struct gdbarch *gdbarch, CORE_ADDR pc)
enum tui_status ret = TUI_FAILURE;
int i;
int offset = TUI_DISASM_WIN->detail.source_info.horizontal_offset;
- int line_width, max_lines;
+ int max_lines;
CORE_ADDR cur_pc;
struct tui_gen_win_info *locator = tui_locator_win_info_ptr ();
int tab_len = tui_default_tab_len ();
@@ -203,8 +203,6 @@ tui_set_disassem_content (struct gdbarch *gdbarch, CORE_ADDR pc)
* max_lines);
memset (asm_lines, 0, sizeof (struct tui_asm_line) * max_lines);
- line_width = TUI_DISASM_WIN->generic.width - 1;
-
tui_disassemble (gdbarch, asm_lines, pc, max_lines);
/* See what is the maximum length of an address and of a line. */
diff --git a/gdb/valarith.c b/gdb/valarith.c
index bdc98ff..18c14fc 100644
--- a/gdb/valarith.c
+++ b/gdb/valarith.c
@@ -510,7 +510,7 @@ value_x_unop (struct value *arg1, enum exp_opcode op, enum noside noside)
{
struct gdbarch *gdbarch = get_type_arch (value_type (arg1));
struct value **argvec;
- char *ptr, *mangle_ptr;
+ char *ptr;
char tstr[13], mangle_tstr[13];
int static_memfuncp, nargs;
@@ -532,7 +532,6 @@ value_x_unop (struct value *arg1, enum exp_opcode op, enum noside noside)
strcpy (tstr, "operator__");
ptr = tstr + 8;
strcpy (mangle_tstr, "__");
- mangle_ptr = mangle_tstr + 2;
switch (op)
{
case UNOP_PREINCREMENT:
diff --git a/gdb/valops.c b/gdb/valops.c
index 5b2abf4..2132f3e 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -2236,7 +2236,6 @@ search_struct_method (const char *name, struct value **arg1p,
for (i = TYPE_N_BASECLASSES (type) - 1; i >= 0; i--)
{
int base_offset;
- int skip = 0;
int this_offset;
if (BASETYPE_VIA_VIRTUAL (type, i))
diff --git a/gdb/valprint.c b/gdb/valprint.c
index 42dacc5..05d6c3e 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -370,7 +370,6 @@ generic_val_print (struct type *type, const gdb_byte *valaddr,
const struct generic_val_print_decorations *decorations)
{
struct gdbarch *gdbarch = get_type_arch (type);
- enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
unsigned int i = 0; /* Number of characters printed. */
unsigned len;
struct type *elttype, *unresolved_elttype;
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 9d92bc4..9255dc4 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -1969,7 +1969,6 @@ varobj_value_has_mutated (struct varobj *var, struct value *new_value,
VEC(varobj_update_result) *
varobj_update (struct varobj **varp, int explicit)
{
- int changed = 0;
int type_changed = 0;
int i;
struct value *new;