This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Get rid of warnings about unused variables



A compiliation with all architectures gave warnings about unused
variables in bfd.  Here's a patch.

Ok to commit?

Andreas

2001-05-01  Andreas Jaeger  <aj@suse.de>

	* elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
	(elf_generic_info_to_howto_rel): Likewise.
	* coff-alpha.c (reloc_nil): Likewise.
	(alpha_ecoff_bad_format_hook): Likewise.
	(alpha_adjust_reloc_out): Likewise.
	(alpha_bfd_reloc_type_lookup): Likewise.
	(alpha_convert_external_reloc): Likewise.
	* elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
	(elf64_alpha_reloc_bad): Likewise.
	(elf64_alpha_reloc_gpdisp): Likewise.
	(elf64_alpha_bfd_reloc_type_lookup): Likewise.
	(elf64_alpha_info_to_howto): Likewise.
	(elf64_alpha_add_symbol_hook): Likewise.
	(elf64_alpha_create_got_section): Likewise.
	(elf64_alpha_is_local_label_name): Likewise.
	(elf64_alpha_merge_ind_symbols): Likewise.
	* elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
	(mips_elf64_get_reloc_upper_bound): Likewise.
	* nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
	(nlm_alpha_get_public_offset): Likewise.

============================================================
Index: bfd/elf64-gen.c
--- bfd/elf64-gen.c	2001/03/27 02:05:18	1.5
+++ bfd/elf64-gen.c	2001/05/01 10:02:26
@@ -1,5 +1,5 @@
 /* Generic support for 64-bit ELF
-   Copyright 1993, 1995, 1998, 1999 Free Software Foundation, Inc.
+   Copyright 1993, 1995, 1998, 1999, 2001 Free Software Foundation, Inc.
 
 This file is part of BFD, the Binary File Descriptor library.
 
@@ -42,18 +42,18 @@
 
 static void
 elf_generic_info_to_howto (abfd, bfd_reloc, elf_reloc)
-     bfd *abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
      arelent *bfd_reloc;
-     Elf64_Internal_Rela *elf_reloc;
+     Elf64_Internal_Rela *elf_reloc ATTRIBUTE_UNUSED;
 {
   bfd_reloc->howto = &dummy;
 }
 
 static void
 elf_generic_info_to_howto_rel (abfd, bfd_reloc, elf_reloc)
-     bfd *abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
      arelent *bfd_reloc;
-     Elf64_Internal_Rel *elf_reloc;
+     Elf64_Internal_Rel *elf_reloc ATTRIBUTE_UNUSED;
 {
   bfd_reloc->howto = &dummy;
 }
============================================================
Index: bfd/elf64-alpha.c
--- bfd/elf64-alpha.c	2001/03/08 21:04:00	1.23
+++ bfd/elf64-alpha.c	2001/05/01 10:02:32
@@ -867,13 +867,13 @@
 
 static bfd_reloc_status_type
 elf64_alpha_reloc_nil (abfd, reloc, sym, data, sec, output_bfd, error_message)
-     bfd *abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
      arelent *reloc;
-     asymbol *sym;
-     PTR data;
+     asymbol *sym ATTRIBUTE_UNUSED;
+     PTR data ATTRIBUTE_UNUSED;
      asection *sec;
      bfd *output_bfd;
-     char **error_message;
+     char **error_message ATTRIBUTE_UNUSED;
 {
   if (output_bfd)
     reloc->address += sec->output_offset;
@@ -884,13 +884,13 @@
 
 static bfd_reloc_status_type
 elf64_alpha_reloc_bad (abfd, reloc, sym, data, sec, output_bfd, error_message)
-     bfd *abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
      arelent *reloc;
-     asymbol *sym;
-     PTR data;
+     asymbol *sym ATTRIBUTE_UNUSED;
+     PTR data ATTRIBUTE_UNUSED;
      asection *sec;
      bfd *output_bfd;
-     char **error_message;
+     char **error_message ATTRIBUTE_UNUSED;
 {
   if (output_bfd)
     reloc->address += sec->output_offset;
@@ -947,7 +947,7 @@
 			  output_bfd, err_msg)
      bfd *abfd;
      arelent *reloc_entry;
-     asymbol *sym;
+     asymbol *sym ATTRIBUTE_UNUSED;
      PTR data;
      asection *input_section;
      bfd *output_bfd;
@@ -1028,7 +1028,7 @@
 
 static reloc_howto_type *
 elf64_alpha_bfd_reloc_type_lookup (abfd, code)
-     bfd *abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
      bfd_reloc_code_real_type code;
 {
   const struct elf_reloc_map *i, *e;
@@ -1046,7 +1046,7 @@
 
 static void
 elf64_alpha_info_to_howto (abfd, cache_ptr, dst)
-     bfd *abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
      arelent *cache_ptr;
      Elf64_Internal_Rela *dst;
 {
@@ -1848,8 +1848,8 @@
      bfd *abfd;
      struct bfd_link_info *info;
      const Elf_Internal_Sym *sym;
-     const char **namep;
-     flagword *flagsp;
+     const char **namep ATTRIBUTE_UNUSED;
+     flagword *flagsp ATTRIBUTE_UNUSED;
      asection **secp;
      bfd_vma *valp;
 {
@@ -1884,7 +1884,7 @@
 static boolean
 elf64_alpha_create_got_section(abfd, info)
      bfd *abfd;
-     struct bfd_link_info *info;
+     struct bfd_link_info *info ATTRIBUTE_UNUSED;
 {
   asection *s;
 
@@ -2087,7 +2087,7 @@
 
 static boolean
 elf64_alpha_is_local_label_name (abfd, name)
-     bfd *abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
      const char *name;
 {
   return name[0] == '$';
@@ -2739,7 +2739,7 @@
 static boolean
 elf64_alpha_merge_ind_symbols (hi, dummy)
      struct alpha_elf_link_hash_entry *hi;
-     PTR dummy;
+     PTR dummy ATTRIBUTE_UNUSED;
 {
   struct alpha_elf_link_hash_entry *hs;
 
============================================================
Index: bfd/elf64-mips.c
--- bfd/elf64-mips.c	2001/04/08 05:11:48	1.14
+++ bfd/elf64-mips.c	2001/05/01 10:02:33
@@ -1390,7 +1390,7 @@
 
 static reloc_howto_type *
 mips_elf64_reloc_type_lookup (abfd, code)
-     bfd *abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
      bfd_reloc_code_real_type code;
 {
   unsigned int i;
@@ -1414,7 +1414,7 @@
 
 static long
 mips_elf64_get_reloc_upper_bound (abfd, sec)
-     bfd *abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
      asection *sec;
 {
   return (sec->reloc_count * 3 + 1) * sizeof (arelent *);
============================================================
Index: bfd/nlm32-alpha.c
--- bfd/nlm32-alpha.c	2001/03/08 21:04:01	1.3
+++ bfd/nlm32-alpha.c	2001/05/01 10:02:34
@@ -1,5 +1,5 @@
 /* Support for 32-bit Alpha NLM (NetWare Loadable Module)
-   Copyright 1993, 1994, 2000 Free Software Foundation, Inc.
+   Copyright 1993, 1994, 2000, 2001 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support.
 
 This file is part of BFD, the Binary File Descriptor library.
@@ -603,11 +603,11 @@
 
 static boolean
 nlm_alpha_mangle_relocs (abfd, sec, data, offset, count)
-     bfd *abfd;
-     asection *sec;
-     PTR data;
-     bfd_vma offset;
-     bfd_size_type count;
+     bfd *abfd ATTRIBUTE_UNUSED;
+     asection *sec ATTRIBUTE_UNUSED;
+     PTR data ATTRIBUTE_UNUSED;
+     bfd_vma offset ATTRIBUTE_UNUSED;
+     bfd_size_type count ATTRIBUTE_UNUSED;
 {
   return true;
 }
@@ -807,7 +807,7 @@
 
 static bfd_vma
 nlm_alpha_get_public_offset (abfd, sym)
-     bfd *abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
      asymbol *sym;
 {
   return bfd_asymbol_value (sym);


-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]