Remove unused local variable
[deliverable/binutils-gdb.git] / bfd / ieee.c
index 1fecf5ae325e5ac43ffa09b3dd7b1bc8554e1d11..a3d08bb819a770f1479261339dfb77c651f32bc0 100644 (file)
@@ -1,7 +1,5 @@
 /* BFD back-end for ieee-695 objects.
-   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
-   Free Software Foundation, Inc.
+   Copyright (C) 1990-2014 Free Software Foundation, Inc.
 
    Written by Steve Chamberlain of Cygnus Support.
 
@@ -35,6 +33,7 @@
 #include "ieee.h"
 #include "libieee.h"
 #include "safe-ctype.h"
+#include "libiberty.h"
 
 struct output_buffer_struct
 {
@@ -228,7 +227,7 @@ ieee_write_expression (bfd *abfd,
                       bfd_vma value,
                       asymbol *symbol,
                       bfd_boolean pcrel,
-                      unsigned int index)
+                      unsigned int sindex)
 {
   unsigned int term_count = 0;
 
@@ -297,7 +296,7 @@ ieee_write_expression (bfd *abfd,
       /* Subtract the pc from here by asking for PC of this section.  */
       if (! ieee_write_byte (abfd, ieee_variable_P_enum)
          || ! ieee_write_byte (abfd,
-                               (bfd_byte) (index + IEEE_SECTION_NUMBER_BASE))
+                               (bfd_byte) (sindex + IEEE_SECTION_NUMBER_BASE))
          || ! ieee_write_byte (abfd, ieee_function_minus_enum))
        return FALSE;
     }
@@ -533,6 +532,7 @@ parse_expression (ieee_data_type *ieee,
            next_byte (&(ieee->h));
            *pcrel = TRUE;
            section_n = must_parse_int (&(ieee->h));
+           (void) section_n;
            PUSH (NOSYMBOL, bfd_abs_section_ptr, 0);
            break;
          }
@@ -637,6 +637,8 @@ parse_expression (ieee_data_type *ieee,
       ieee_symbol_index_type sy1;
 
       POP (sy1, section1, *extra);
+      (void) section1;
+      (void) sy1;
     }
 
   POP (*symbol, dummy, *value);
@@ -776,6 +778,7 @@ ieee_slurp_external_symbols (bfd *abfd)
              case ieee_attribute_record_enum:
                symbol_name_index = must_parse_int (&(ieee->h));
                symbol_type_index = must_parse_int (&(ieee->h));
+               (void) symbol_type_index;
                symbol_attribute_def = must_parse_int (&(ieee->h));
                switch (symbol_attribute_def)
                  {
@@ -850,6 +853,7 @@ ieee_slurp_external_symbols (bfd *abfd)
            next_byte (&(ieee->h));
 
            symbol_name_index = must_parse_int (&(ieee->h));
+           (void) symbol_name_index;
            parse_expression (ieee,
                              &symbol->symbol.value,
                              &symbol_ignore,
@@ -1045,9 +1049,9 @@ ieee_canonicalize_symtab (bfd *abfd, asymbol **location)
 }
 
 static asection *
-get_section_entry (bfd *abfd, ieee_data_type *ieee, unsigned int index)
+get_section_entry (bfd *abfd, ieee_data_type *ieee, unsigned int sindex)
 {
-  if (index >= ieee->section_table_size)
+  if (sindex >= ieee->section_table_size)
     {
       unsigned int c, i;
       asection **n;
@@ -1056,7 +1060,7 @@ get_section_entry (bfd *abfd, ieee_data_type *ieee, unsigned int index)
       c = ieee->section_table_size;
       if (c == 0)
        c = 20;
-      while (c <= index)
+      while (c <= sindex)
        c *= 2;
 
       amt = c;
@@ -1072,20 +1076,20 @@ get_section_entry (bfd *abfd, ieee_data_type *ieee, unsigned int index)
       ieee->section_table_size = c;
     }
 
-  if (ieee->section_table[index] == (asection *) NULL)
+  if (ieee->section_table[sindex] == (asection *) NULL)
     {
       char *tmp = bfd_alloc (abfd, (bfd_size_type) 11);
       asection *section;
 
       if (!tmp)
        return NULL;
-      sprintf (tmp, " fsec%4d", index);
+      sprintf (tmp, " fsec%4d", sindex);
       section = bfd_make_section (abfd, tmp);
-      ieee->section_table[index] = section;
-      section->target_index = index;
-      ieee->section_table[index] = section;
+      ieee->section_table[sindex] = section;
+      section->target_index = sindex;
+      ieee->section_table[sindex] = section;
     }
-  return ieee->section_table[index];
+  return ieee->section_table[sindex];
 }
 
 static void
@@ -1657,7 +1661,7 @@ ieee_slurp_section_data (bfd *abfd)
   unsigned int section_number;
   ieee_per_section_type *current_map = NULL;
   asection *s;
-  
+
   /* Seek to the start of the data area.  */
   if (ieee->read_data)
     return TRUE;
@@ -1819,7 +1823,7 @@ ieee_object_p (bfd *abfd)
     goto got_wrong_format;
   ieee->mb.module_name = read_id (&(ieee->h));
   if (abfd->filename == (const char *) NULL)
-    abfd->filename = ieee->mb.module_name;
+    abfd->filename = xstrdup (ieee->mb.module_name);
 
   /* Determine the architecture and machine type of the object file.  */
   {
@@ -2669,6 +2673,7 @@ drop_int (struct output_buffer_struct *buf)
          break;
        }
     }
+  (void) ch;
   OUT (0x84);
   buf->ptrp = output_ptr;
   buf->buffer = output_buffer;
@@ -3743,6 +3748,7 @@ ieee_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
     (bfd *, unsigned int, struct orl *, unsigned int, int)) \
    bfd_true)
 #define ieee_read_ar_hdr bfd_nullvoidptr
+#define ieee_write_ar_hdr ((bfd_boolean (*) (bfd *, bfd *)) bfd_false)
 #define ieee_update_armap_timestamp bfd_true
 #define ieee_get_elt_at_index _bfd_generic_get_elt_at_index
 
@@ -3765,6 +3771,7 @@ ieee_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
   bfd_generic_get_relocated_section_contents
 #define ieee_bfd_relax_section bfd_generic_relax_section
 #define ieee_bfd_gc_sections bfd_generic_gc_sections
+#define ieee_bfd_lookup_section_flags bfd_generic_lookup_section_flags
 #define ieee_bfd_merge_sections bfd_generic_merge_sections
 #define ieee_bfd_is_group_section bfd_generic_is_group_section
 #define ieee_bfd_discard_group bfd_generic_discard_group
@@ -3772,9 +3779,10 @@ ieee_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
   _bfd_generic_section_already_linked
 #define ieee_bfd_define_common_symbol bfd_generic_define_common_symbol
 #define ieee_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
-#define ieee_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
 #define ieee_bfd_link_add_symbols _bfd_generic_link_add_symbols
 #define ieee_bfd_link_just_syms _bfd_generic_link_just_syms
+#define ieee_bfd_copy_link_hash_symbol_type \
+  _bfd_generic_copy_link_hash_symbol_type
 #define ieee_bfd_final_link _bfd_generic_final_link
 #define ieee_bfd_link_split_section  _bfd_generic_link_split_section
 
@@ -3792,6 +3800,7 @@ const bfd_target ieee_vec =
   '_',                         /* Leading underscore.  */
   ' ',                         /* AR_pad_char.  */
   16,                          /* AR_max_namelen.  */
+  0,                           /* match priority.  */
   bfd_getb64, bfd_getb_signed_64, bfd_putb64,
   bfd_getb32, bfd_getb_signed_32, bfd_putb32,
   bfd_getb16, bfd_getb_signed_16, bfd_putb16,  /* Data.  */
@@ -3847,7 +3856,6 @@ const bfd_target ieee_vec =
 
   /* ieee_sizeof_headers, ieee_bfd_get_relocated_section_contents,
      ieee_bfd_relax_section, ieee_bfd_link_hash_table_create,
-     _bfd_generic_link_hash_table_free,
      ieee_bfd_link_add_symbols, ieee_bfd_final_link,
      ieee_bfd_link_split_section, ieee_bfd_gc_sections,
      ieee_bfd_merge_sections.  */
This page took 0.031604 seconds and 4 git commands to generate.