aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/ChangeLog13
-rw-r--r--bfd/aoutx.h6
-rw-r--r--bfd/elf-eh-frame.c7
-rw-r--r--bfd/elf.c7
-rw-r--r--bfd/elf32-i386.c2
-rw-r--r--bfd/peXXigen.c4
-rw-r--r--bfd/verilog.c5
-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
-rw-r--r--gas/ChangeLog8
-rw-r--r--gas/as.c3
-rw-r--r--gas/listing.c3
-rw-r--r--gas/read.c81
-rw-r--r--ld/ChangeLog4
-rw-r--r--ld/ldlang.c2
-rw-r--r--opcodes/ChangeLog5
-rw-r--r--opcodes/i386-dis.c8
23 files changed, 109 insertions, 129 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index a4548e0..55aeba2 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,16 @@
+2010-04-09 Nick Clifton <nickc@redhat.com>
+
+ * aoutx.h (aout_link_input_bfd): Remove unused variable sym_count.
+ * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Remove unused
+ variables htab and hdr_info and mark info parameter as unused.
+ * elf.c (prep_headers): Remove unused variable i_phdrp.
+ (_bfd_elf_write_object_contents): Remove unused variable i_ehdrp.
+ * elf32-i386.c (elf_i386_relocate_section): Mark variabled warned
+ as unused.
+ * peXXigen.c (pe_print_reloc): Remove unused variable datasize.
+ * verilog.c (verilog_write_section): Remove unused variable
+ address.
+
2010-04-07 Alan Modra <amodra@gmail.com>
* warning.m4 (GCC_WARN_CFLAGS): Only add -Wshadow for gcc-4 and above.
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
index 7488256..c3366b6 100644
--- a/bfd/aoutx.h
+++ b/bfd/aoutx.h
@@ -1,6 +1,6 @@
/* BFD semi-generic back-end for a.out binaries.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -5233,8 +5233,6 @@ aout_link_write_symbols (struct aout_final_link_info *finfo, bfd *input_bfd)
static bfd_boolean
aout_link_input_bfd (struct aout_final_link_info *finfo, bfd *input_bfd)
{
- bfd_size_type sym_count;
-
BFD_ASSERT (bfd_get_format (input_bfd) == bfd_object);
/* If this is a dynamic object, it may need special handling. */
@@ -5248,8 +5246,6 @@ aout_link_input_bfd (struct aout_final_link_info *finfo, bfd *input_bfd)
if (! aout_get_external_symbols (input_bfd))
return FALSE;
- sym_count = obj_aout_external_sym_count (input_bfd);
-
/* Write out the symbols and get a map of the new indices. The map
is placed into finfo->symbol_map. */
if (! aout_link_write_symbols (finfo, input_bfd))
diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c
index c948df2..8380ef8 100644
--- a/bfd/elf-eh-frame.c
+++ b/bfd/elf-eh-frame.c
@@ -1278,13 +1278,11 @@ _bfd_elf_maybe_strip_eh_frame_hdr (struct bfd_link_info *info)
bfd_vma
_bfd_elf_eh_frame_section_offset (bfd *output_bfd ATTRIBUTE_UNUSED,
- struct bfd_link_info *info,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
asection *sec,
bfd_vma offset)
{
struct eh_frame_sec_info *sec_info;
- struct elf_link_hash_table *htab;
- struct eh_frame_hdr_info *hdr_info;
unsigned int lo, hi, mid;
if (sec->sec_info_type != ELF_INFO_TYPE_EH_FRAME)
@@ -1294,9 +1292,6 @@ _bfd_elf_eh_frame_section_offset (bfd *output_bfd ATTRIBUTE_UNUSED,
if (offset >= sec->rawsize)
return offset - sec->rawsize + sec->size;
- htab = elf_hash_table (info);
- hdr_info = &htab->eh_info;
-
lo = 0;
hi = sec_info->count;
mid = 0;
diff --git a/bfd/elf.c b/bfd/elf.c
index cee9b7a..8f8bd61 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -1062,7 +1062,6 @@ _bfd_elf_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
/* Copy object attributes. */
_bfd_elf_copy_obj_attributes (ibfd, obfd);
-
return TRUE;
}
@@ -4872,8 +4871,7 @@ assign_file_positions_except_relocs (bfd *abfd,
static bfd_boolean
prep_headers (bfd *abfd)
{
- Elf_Internal_Ehdr *i_ehdrp; /* Elf file header, internal form */
- Elf_Internal_Phdr *i_phdrp = 0; /* Program header table, internal form */
+ Elf_Internal_Ehdr *i_ehdrp; /* Elf file header, internal form. */
struct elf_strtab_hash *shstrtab;
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
@@ -4941,7 +4939,6 @@ prep_headers (bfd *abfd)
else
{
i_ehdrp->e_phentsize = 0;
- i_phdrp = 0;
i_ehdrp->e_phoff = 0;
}
@@ -4989,7 +4986,6 @@ bfd_boolean
_bfd_elf_write_object_contents (bfd *abfd)
{
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
- Elf_Internal_Ehdr *i_ehdrp;
Elf_Internal_Shdr **i_shdrp;
bfd_boolean failed;
unsigned int count, num_sec;
@@ -4999,7 +4995,6 @@ _bfd_elf_write_object_contents (bfd *abfd)
return FALSE;
i_shdrp = elf_elfsections (abfd);
- i_ehdrp = elf_elfheader (abfd);
failed = FALSE;
bfd_map_over_sections (abfd, bed->s->write_relocs, &failed);
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 6872072..395a6bb 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -2946,7 +2946,7 @@ elf_i386_relocate_section (bfd *output_bfd,
}
else
{
- bfd_boolean warned;
+ bfd_boolean warned ATTRIBUTE_UNUSED;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c
index 8f56f21..f977467 100644
--- a/bfd/peXXigen.c
+++ b/bfd/peXXigen.c
@@ -1,6 +1,6 @@
/* Support for the generic parts of PE/PEI; the common executable parts.
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 Cygnus Solutions.
This file is part of BFD, the Binary File Descriptor library.
@@ -1922,7 +1922,6 @@ pe_print_reloc (bfd * abfd, void * vfile)
FILE *file = (FILE *) vfile;
bfd_byte *data = 0;
asection *section = bfd_get_section_by_name (abfd, ".reloc");
- bfd_size_type datasize;
bfd_size_type i;
bfd_size_type start, stop;
@@ -1935,7 +1934,6 @@ pe_print_reloc (bfd * abfd, void * vfile)
fprintf (file,
_("\n\nPE File Base Relocations (interpreted .reloc section contents)\n"));
- datasize = section->size;
if (! bfd_malloc_and_get_section (abfd, section, &data))
{
if (data != NULL)
diff --git a/bfd/verilog.c b/bfd/verilog.c
index 2c60849..551e5c4 100644
--- a/bfd/verilog.c
+++ b/bfd/verilog.c
@@ -1,5 +1,5 @@
/* BFD back-end for verilog hex memory dump files.
- Copyright 2009
+ Copyright 2009, 2010
Free Software Foundation, Inc.
Written by Anthony Green <green@moxielogic.com>
@@ -222,14 +222,11 @@ verilog_write_section (bfd *abfd,
verilog_write_address (abfd, list->where);
while (octets_written < list->size)
{
- bfd_vma address;
unsigned int octets_this_chunk = list->size - octets_written;
if (octets_this_chunk > 16)
octets_this_chunk = 16;
- address = list->where + octets_written / bfd_octets_per_byte (abfd);
-
if (! verilog_write_record (abfd,
location,
location + octets_this_chunk))
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;
}
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 0cd45b1..ddaad52 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,11 @@
+2010-04-09 Nick Clifton <nickc@redhat.com>
+
+ * as.c (create_obj_attrs_section): Remove unused variable addr.
+ * listing.c (listing_listing): Remove unused variable message.
+ * read.c: Remove unnecessary register type qualifiers.
+ (s_mri): Only define/use old_flag variable if MRI_MODE_CHANGE is
+ defined.
+
2010-04-07 Eric B. Weddington <eric.weddington@atmel.com>
* config/tc-avr.c (mcu_types): Add support for atmega16a, atmega168a,
diff --git a/gas/as.c b/gas/as.c
index b23d667..fd74cb1 100644
--- a/gas/as.c
+++ b/gas/as.c
@@ -1055,7 +1055,6 @@ create_obj_attrs_section (void)
{
segT s;
char *p;
- addressT addr;
offsetT size;
const char *name;
@@ -1069,7 +1068,7 @@ create_obj_attrs_section (void)
elf_section_type (s)
= get_elf_backend_data (stdoutput)->obj_attrs_section_type;
bfd_set_section_flags (stdoutput, s, SEC_READONLY | SEC_DATA);
- addr = frag_now_fix ();
+ frag_now_fix ();
p = frag_more (size);
bfd_elf_set_obj_attr_contents (stdoutput, (bfd_byte *)p, size);
}
diff --git a/gas/listing.c b/gas/listing.c
index 002b3c5..929ec98 100644
--- a/gas/listing.c
+++ b/gas/listing.c
@@ -1146,7 +1146,6 @@ listing_listing (char *name ATTRIBUTE_UNUSED)
{
list_info_type *list = head;
file_info_type *current_hll_file = (file_info_type *) NULL;
- char *message;
char *buffer;
char *p;
int show_listing = 1;
@@ -1211,8 +1210,6 @@ listing_listing (char *name ATTRIBUTE_UNUSED)
{
/* Scan down the list and print all the stuff which can be done
with this line (or lines). */
- message = 0;
-
if (list->hll_file)
current_hll_file = list->hll_file;
diff --git a/gas/read.c b/gas/read.c
index 9f75fee..4afb190 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -1,7 +1,7 @@
/* read.c - read a source file -
Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
- Free Software Foundation, Inc.
+ 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
+ 2010 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -1641,7 +1641,7 @@ void
s_data (int ignore ATTRIBUTE_UNUSED)
{
segT section;
- register int temp;
+ int temp;
temp = get_absolute_expression ();
if (flag_readonly_data_in_text)
@@ -1683,7 +1683,7 @@ s_app_file_string (char *file, int appfile ATTRIBUTE_UNUSED)
void
s_app_file (int appfile)
{
- register char *s;
+ char *s;
int length;
/* Some assemblers tolerate immediately following '"'. */
@@ -1917,7 +1917,7 @@ s_fill (int ignore ATTRIBUTE_UNUSED)
{
expressionS rep_exp;
long size = 1;
- register long fill = 0;
+ long fill = 0;
char *p;
#ifdef md_flush_pending_output
@@ -2428,11 +2428,11 @@ s_lcomm_bytes (int needs_align)
void
s_lsym (int ignore ATTRIBUTE_UNUSED)
{
- register char *name;
- register char c;
- register char *p;
+ char *name;
+ char c;
+ char *p;
expressionS exp;
- register symbolS *symbolP;
+ symbolS *symbolP;
/* We permit ANY defined expression: BSD4.2 demands constants. */
name = input_line_pointer;
@@ -2607,10 +2607,15 @@ s_mexit (int ignore ATTRIBUTE_UNUSED)
void
s_mri (int ignore ATTRIBUTE_UNUSED)
{
- int on, old_flag;
+ int on;
+#ifdef MRI_MODE_CHANGE
+ int old_flag;
+#endif
on = get_absolute_expression ();
+#ifdef MRI_MODE_CHANGE
old_flag = flag_mri;
+#endif
if (on != 0)
{
flag_mri = 1;
@@ -2680,9 +2685,9 @@ do_org (segT segment, expressionS *exp, int fill)
void
s_org (int ignore ATTRIBUTE_UNUSED)
{
- register segT segment;
+ segT segment;
expressionS exp;
- register long temp_fill;
+ long temp_fill;
#ifdef md_flush_pending_output
md_flush_pending_output ();
@@ -3452,7 +3457,7 @@ s_struct (int ignore ATTRIBUTE_UNUSED)
void
s_text (int ignore ATTRIBUTE_UNUSED)
{
- register int temp;
+ int temp;
temp = get_absolute_expression ();
subseg_set (text_section, (subsegT) temp);
@@ -3820,7 +3825,7 @@ do_parse_cons_expression (expressionS *exp,
Clobbers input_line_pointer and checks end-of-line. */
static void
-cons_worker (register int nbytes, /* 1=.byte, 2=.word, 4=.long. */
+cons_worker (int nbytes, /* 1=.byte, 2=.word, 4=.long. */
int rva)
{
int c;
@@ -4014,7 +4019,7 @@ void
emit_expr (expressionS *exp, unsigned int nbytes)
{
operatorT op;
- register char *p;
+ char *p;
valueT extra_digit = 0;
/* Don't do anything if we are going to make another pass. */
@@ -4191,11 +4196,11 @@ emit_expr (expressionS *exp, unsigned int nbytes)
if (op == O_constant)
{
- register valueT get;
- register valueT use;
- register valueT mask;
+ valueT get;
+ valueT use;
+ valueT mask;
valueT hibit;
- register valueT unmask;
+ valueT unmask;
/* JF << of >= number of bits in the object is undefined. In
particular SPARC (Sun 4) has problems. */
@@ -4550,7 +4555,7 @@ parse_repeat_cons (exp, nbytes)
unsigned int nbytes;
{
expressionS count;
- register int i;
+ int i;
expression (exp);
@@ -4685,11 +4690,11 @@ hex_float (int float_type, char *bytes)
void
float_cons (/* Clobbers input_line-pointer, checks end-of-line. */
- register int float_type /* 'f':.ffloat ... 'F':.float ... */)
+ int float_type /* 'f':.ffloat ... 'F':.float ... */)
{
- register char *p;
+ char *p;
int length; /* Number of chars in an object. */
- register char *err; /* Error from scanning floating literal. */
+ char *err; /* Error from scanning floating literal. */
char temp[MAXIMUM_NUMBER_OF_CHARS_FOR_FLOAT];
if (is_it_end_of_statement ())
@@ -4786,8 +4791,8 @@ float_cons (/* Clobbers input_line-pointer, checks end-of-line. */
static inline int
sizeof_sleb128 (offsetT value)
{
- register int size = 0;
- register unsigned byte;
+ int size = 0;
+ unsigned byte;
do
{
@@ -4807,12 +4812,10 @@ sizeof_sleb128 (offsetT value)
static inline int
sizeof_uleb128 (valueT value)
{
- register int size = 0;
- register unsigned byte;
+ int size = 0;
do
{
- byte = (value & 0x7f);
value >>= 7;
size += 1;
}
@@ -4835,8 +4838,8 @@ sizeof_leb128 (valueT value, int sign)
static inline int
output_sleb128 (char *p, offsetT value)
{
- register char *orig = p;
- register int more;
+ char *orig = p;
+ int more;
do
{
@@ -5243,7 +5246,7 @@ stringer (int bits_appendzero)
unsigned int
next_char_of_string (void)
{
- register unsigned int c;
+ unsigned int c;
c = *input_line_pointer++ & CHAR_MASK;
switch (c)
@@ -5363,9 +5366,9 @@ next_char_of_string (void)
}
static segT
-get_segmented_expression (register expressionS *expP)
+get_segmented_expression (expressionS *expP)
{
- register segT retval;
+ segT retval;
retval = expression (expP);
if (expP->X_op == O_illegal
@@ -5381,9 +5384,9 @@ get_segmented_expression (register expressionS *expP)
}
static segT
-get_known_segmented_expression (register expressionS *expP)
+get_known_segmented_expression (expressionS *expP)
{
- register segT retval;
+ segT retval;
if ((retval = get_segmented_expression (expP)) == undefined_section)
{
@@ -5417,11 +5420,11 @@ get_absolute_expression_and_terminator (long *val_pointer /* Return value of exp
char *
demand_copy_C_string (int *len_pointer)
{
- register char *s;
+ char *s;
if ((s = demand_copy_string (len_pointer)) != 0)
{
- register int len;
+ int len;
for (len = *len_pointer; len > 0; len--)
{
@@ -5444,8 +5447,8 @@ demand_copy_C_string (int *len_pointer)
char *
demand_copy_string (int *lenP)
{
- register unsigned int c;
- register int len;
+ unsigned int c;
+ int len;
char *retval;
len = 0;
diff --git a/ld/ChangeLog b/ld/ChangeLog
index c93b921..7ef05f5 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,7 @@
+2010-04-09 Nick Clifton <nickc@redhat.com>
+
+ * ldlang.c (wild_sort): Remove unused variable section_name.
+
2010-04-07 Alan Modra <amodra@gmail.com>
* configure: Regenerate.
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 09bfd26..5ba4360 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -2325,14 +2325,12 @@ wild_sort (lang_wild_statement_type *wild,
lang_input_statement_type *file,
asection *section)
{
- const char *section_name;
lang_statement_union_type *l;
if (!wild->filenames_sorted
&& (sec == NULL || sec->spec.sorted == none))
return NULL;
- section_name = bfd_get_section_name (file->the_bfd, section);
for (l = wild->children.head; l != NULL; l = l->header.next)
{
lang_input_section_type *ls;
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index b98683f..1e5b4de 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,8 @@
+2010-04-09 Nick Clifton <nickc@redhat.com>
+
+ * i386-dis.c (print_insn): Remove unused variable op.
+ (OP_sI): Remove unused variable mask.
+
2010-04-07 Alan Modra <amodra@gmail.com>
* configure: Regenerate.
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index 98d78f9..797d0bd 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -11242,7 +11242,6 @@ print_insn (bfd_vma pc, disassemble_info *info)
int sizeflag;
const char *p;
struct dis_private priv;
- unsigned char op;
int prefix_length;
int default_prefixes;
@@ -11447,8 +11446,6 @@ print_insn (bfd_vma pc, disassemble_info *info)
return 1;
}
- op = 0;
-
if (*codep == 0x0f)
{
unsigned char threebyte;
@@ -13532,7 +13529,6 @@ static void
OP_sI (int bytemode, int sizeflag)
{
bfd_signed_vma op;
- bfd_signed_vma mask = -1;
switch (bytemode)
{
@@ -13541,7 +13537,6 @@ OP_sI (int bytemode, int sizeflag)
op = *codep++;
if ((op & 0x80) != 0)
op -= 0x100;
- mask = 0xffffffff;
break;
case v_mode:
USED_REX (REX_W);
@@ -13552,11 +13547,9 @@ OP_sI (int bytemode, int sizeflag)
if (sizeflag & DFLAG)
{
op = get32s ();
- mask = 0xffffffff;
}
else
{
- mask = 0xffffffff;
op = get16 ();
if ((op & 0x8000) != 0)
op -= 0x10000;
@@ -13566,7 +13559,6 @@ OP_sI (int bytemode, int sizeflag)
break;
case w_mode:
op = get16 ();
- mask = 0xffffffff;
if ((op & 0x8000) != 0)
op -= 0x10000;
break;