aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog23
-rw-r--r--binutils/dwarf.c6
-rw-r--r--binutils/elfedit.c2
-rw-r--r--binutils/ieee.c10
-rw-r--r--binutils/objdump.c4
-rw-r--r--binutils/rddbg.c6
-rw-r--r--binutils/readelf.c4
-rw-r--r--binutils/stabs.c25
8 files changed, 30 insertions, 50 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 78d72cf..2db6368 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,26 @@
+2010-04-09 Nick Clifton <nickc@redhat.com>
+
+ * dwarf.c (process_debug_info): Remove unused variable
+ cu_abbrev_offset_ptr.
+ (display_debug_lines_decoded): Remove unused variable prev_line.
+ * elfedit.c (process_archive): Remove unused variable
+ file_name_size.
+ * ieee.c (ieee_start_compilation_unit): Remove unused variable
+ nindx.
+ (ieee_set_type): Remove unused variables info, targetindx and
+ baseindx.
+ * objdump.c (disassmble_byte): Remove unused variable done_dot.
+ * rddbg.c (read_section_stabs_debugging_info): Remove unused
+ variable other.
+ * readelf.c (dump_section_as_strings): Remove unused variable
+ addr.
+ (process_archive): Remove unused variable file_name_size.
+ * stabs.c (parse_stab_string): Mark desc parameter as unused.
+ Remove unused variable lineno.
+ (parse_stab_struct_type): Remove unused variable orig.
+ (stab_demangle_type): Remove unused variables constp, volatilep
+ and hold.
+
2010-04-07 Alan Modra <amodra@gmail.com>
* configure: Regenerate.
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 094fd27..cf5c8e1 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -1956,7 +1956,6 @@ process_debug_info (struct dwarf_section *section,
{
DWARF2_Internal_CompUnit compunit;
unsigned char *hdrptr;
- unsigned char *cu_abbrev_offset_ptr;
unsigned char *tags;
int level;
unsigned long cu_offset;
@@ -1988,7 +1987,6 @@ process_debug_info (struct dwarf_section *section,
cu_offset = start - section_begin;
- cu_abbrev_offset_ptr = hdrptr;
compunit.cu_abbrev_offset = byte_get (hdrptr, offset_size);
hdrptr += offset_size;
@@ -2607,7 +2605,6 @@ display_debug_lines_decoded (struct dwarf_section *section,
int i;
File_Entry *file_table = NULL;
unsigned char **directory_table = NULL;
- unsigned int prev_line = 0;
hdrptr = data;
@@ -2797,7 +2794,6 @@ display_debug_lines_decoded (struct dwarf_section *section,
int is_special_opcode = 0;
op_code = *data++;
- prev_line = state_machine_regs.line;
if (op_code >= linfo.li_opcode_base)
{
@@ -3751,14 +3747,12 @@ display_debug_ranges (struct dwarf_section *section,
void *file ATTRIBUTE_UNUSED)
{
unsigned char *start = section->start;
- unsigned char *section_end;
unsigned long bytes;
unsigned char *section_begin = start;
unsigned int num_range_list, i;
struct range_entry *range_entries, *range_entry_fill;
bytes = section->size;
- section_end = start + bytes;
if (bytes == 0)
{
diff --git a/binutils/elfedit.c b/binutils/elfedit.c
index b71990c..ce77af4 100644
--- a/binutils/elfedit.c
+++ b/binutils/elfedit.c
@@ -780,7 +780,6 @@ process_archive (const char * file_name, FILE * file,
struct archive_info arch;
struct archive_info nested_arch;
size_t got;
- size_t file_name_size;
int ret;
/* The ARCH structure is used to hold information about this archive. */
@@ -805,7 +804,6 @@ process_archive (const char * file_name, FILE * file,
goto out;
}
- file_name_size = strlen (file_name);
ret = 0;
while (1)
diff --git a/binutils/ieee.c b/binutils/ieee.c
index 9a5bb55..34b9373 100644
--- a/binutils/ieee.c
+++ b/binutils/ieee.c
@@ -1,6 +1,6 @@
/* ieee.c -- Read and write IEEE-695 debugging information.
Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007,
- 2008, 2009 Free Software Foundation, Inc.
+ 2008, 2009, 2010 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -4824,7 +4824,6 @@ ieee_start_compilation_unit (void *p, const char *filename)
const char *backslash;
#endif
char *c, *s;
- unsigned int nindx;
if (info->filename != NULL)
{
@@ -4872,7 +4871,6 @@ ieee_start_compilation_unit (void *p, const char *filename)
|| ! ieee_write_id (info, info->modname))
return FALSE;
- nindx = info->name_indx;
++info->name_indx;
if (! ieee_change_buffer (info, &info->vars)
|| ! ieee_write_byte (info, (int) ieee_bb_record_enum)
@@ -5688,12 +5686,6 @@ ieee_set_type (void *p, bfd_boolean bitstringp ATTRIBUTE_UNUSED)
static bfd_boolean
ieee_offset_type (void *p)
{
- struct ieee_handle *info = (struct ieee_handle *) p;
- unsigned int targetindx, baseindx;
-
- targetindx = ieee_pop_type (info);
- baseindx = ieee_pop_type (info);
-
/* FIXME: The MRI C++ compiler does not appear to generate any
useful type information about an offset type. It just records a
pointer to member as an integer. The MRI/HP IEEE spec does
diff --git a/binutils/objdump.c b/binutils/objdump.c
index 41d0b4e..44d363b 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -1457,7 +1457,6 @@ disassemble_bytes (struct disassemble_info * inf,
struct objdump_disasm_info *aux;
asection *section;
int octets_per_line;
- bfd_boolean done_dot;
int skip_addr_chars;
bfd_vma addr_offset;
unsigned int opb = inf->octets_per_byte;
@@ -1504,7 +1503,6 @@ disassemble_bytes (struct disassemble_info * inf,
inf->insn_info_valid = 0;
- done_dot = FALSE;
addr_offset = start_offset;
while (addr_offset < stop_offset)
{
@@ -1557,8 +1555,6 @@ disassemble_bytes (struct disassemble_info * inf,
int bpc = 0;
int pb = 0;
- done_dot = FALSE;
-
if (with_line_numbers || with_source_code)
show_line (aux->abfd, section, addr_offset);
diff --git a/binutils/rddbg.c b/binutils/rddbg.c
index e21ed6f..27abd66 100644
--- a/binutils/rddbg.c
+++ b/binutils/rddbg.c
@@ -1,6 +1,6 @@
/* rddbg.c -- Read debugging information into a generic form.
- Copyright 1995, 1996, 1997, 2000, 2002, 2003, 2005, 2007, 2008
- Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 2000, 2002, 2003, 2005, 2007, 2008,
+ 2010 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -164,7 +164,7 @@ read_section_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount,
{
unsigned int strx;
int type;
- int other;
+ int other ATTRIBUTE_UNUSED;
int desc;
bfd_vma value;
diff --git a/binutils/readelf.c b/binutils/readelf.c
index ba4fd9b..4435eff 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -9338,7 +9338,6 @@ dump_section_as_strings (Elf_Internal_Shdr * section, FILE * file)
{
Elf_Internal_Shdr * relsec;
bfd_size_type num_bytes;
- bfd_vma addr;
char * data;
char * end;
char * start;
@@ -9372,7 +9371,6 @@ dump_section_as_strings (Elf_Internal_Shdr * section, FILE * file)
}
num_bytes = section->sh_size;
- addr = section->sh_addr;
data = start;
end = start + num_bytes;
some_strings_shown = FALSE;
@@ -12132,7 +12130,6 @@ process_archive (char * file_name, FILE * file, bfd_boolean is_thin_archive)
struct archive_info arch;
struct archive_info nested_arch;
size_t got;
- size_t file_name_size;
int ret;
show_name = 1;
@@ -12226,7 +12223,6 @@ process_archive (char * file_name, FILE * file, bfd_boolean is_thin_archive)
}
}
- file_name_size = strlen (file_name);
ret = 0;
while (1)
diff --git a/binutils/stabs.c b/binutils/stabs.c
index 3089545..f8fb48c 100644
--- a/binutils/stabs.c
+++ b/binutils/stabs.c
@@ -1,6 +1,6 @@
/* stabs.c -- Parse stabs debugging information
Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+ 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -677,7 +677,7 @@ parse_stab (void *dhandle, void *handle, int type, int desc, bfd_vma value,
static bfd_boolean
parse_stab_string (void *dhandle, struct stab_handle *info, int stabtype,
- int desc, bfd_vma value, const char *string)
+ int desc ATTRIBUTE_UNUSED, bfd_vma value, const char *string)
{
const char *p;
char *name;
@@ -685,7 +685,6 @@ parse_stab_string (void *dhandle, struct stab_handle *info, int stabtype,
debug_type dtype;
bfd_boolean synonym;
bfd_boolean self_crossref;
- unsigned int lineno;
debug_type *slot;
p = strchr (string, ':');
@@ -703,14 +702,6 @@ parse_stab_string (void *dhandle, struct stab_handle *info, int stabtype,
}
}
- /* GCC 2.x puts the line number in desc. SunOS apparently puts in
- the number of bytes occupied by a type or object, which we
- ignore. */
- if (info->gcc_compiled >= 2)
- lineno = desc;
- else
- lineno = 0;
-
/* FIXME: Sometimes the special C++ names start with '.'. */
name = NULL;
if (string[0] == '$')
@@ -2028,7 +2019,6 @@ parse_stab_struct_type (void *dhandle, struct stab_handle *info,
const char *tagname, const char **pp,
bfd_boolean structp, const int *typenums)
{
- const char *orig;
bfd_vma size;
debug_baseclass *baseclasses;
debug_field *fields;
@@ -2037,8 +2027,6 @@ parse_stab_struct_type (void *dhandle, struct stab_handle *info,
debug_type vptrbase;
bfd_boolean ownvptr;
- orig = *pp;
-
/* Get the size. */
size = parse_number (pp, (bfd_boolean *) NULL);
@@ -4667,7 +4655,7 @@ stab_demangle_type (struct stab_demangle_info *minfo, const char **pp,
case 'M':
case 'O':
{
- bfd_boolean memberp, constp, volatilep;
+ bfd_boolean memberp;
debug_type class_type = DEBUG_TYPE_NULL;
debug_type *args;
bfd_boolean varargs;
@@ -4675,8 +4663,6 @@ stab_demangle_type (struct stab_demangle_info *minfo, const char **pp,
const char *name;
memberp = **pp == 'M';
- constp = FALSE;
- volatilep = FALSE;
args = NULL;
varargs = FALSE;
@@ -4720,12 +4706,10 @@ stab_demangle_type (struct stab_demangle_info *minfo, const char **pp,
{
if (**pp == 'C')
{
- constp = TRUE;
++*pp;
}
else if (**pp == 'V')
{
- volatilep = TRUE;
++*pp;
}
if (**pp != 'F')
@@ -4786,9 +4770,6 @@ stab_demangle_type (struct stab_demangle_info *minfo, const char **pp,
case 'Q':
{
- const char *hold;
-
- hold = *pp;
if (! stab_demangle_qualified (minfo, pp, ptype))
return FALSE;
}