]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
authorIan Lance Taylor <ian@airs.com>
Sun, 11 Jul 1999 20:09:04 +0000 (20:09 +0000)
committerIan Lance Taylor <ian@airs.com>
Sun, 11 Jul 1999 20:09:04 +0000 (20:09 +0000)
as appropriate.  Fill in structure initializations.

ld/ChangeLog
ld/emultempl/elf32.em
ld/ldcref.c
ld/ldemul.c
ld/ldexp.c
ld/ldlang.c
ld/ldmain.c

index 55b0e4f054c2ae2a1a0cb101f5743be7b8875bb4..ab15633de03dd8efd53f30b7ed1d28a04d1c00c4 100644 (file)
@@ -1,3 +1,8 @@
+1999-07-11  Ian Lance Taylor  <ian@zembu.com>
+
+       * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
+       as appropriate.  Fill in structure initializations.
+
 1999-07-10  Ian Lance Taylor  <ian@zembu.com>
 
        * ldfile.c: Revert patch of 1999-07-08.
index 41073d25b22af9647cabe19b9ca4c7fcfe575828..fb4d85a813c76fa5d5a21774fede5349589c5843 100644 (file)
@@ -7,7 +7,8 @@ cat >e${EMULATION_NAME}.c <<EOF
 /* This file is is generated by a shell script.  DO NOT EDIT! */
 
 /* ${ELFSIZE} bit ELF emulation code for ${EMULATION_NAME}
-   Copyright (C) 1991, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1991, 93, 94, 95, 96, 97, 98, 1999
+   Free Software Foundation, Inc.
    Written by Steve Chamberlain <sac@cygnus.com>
    ELF support by Ian Lance Taylor <ian@cygnus.com>
 
@@ -1145,5 +1146,10 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
   NULL,
   gld${EMULATION_NAME}_open_dynamic_archive,
   gld${EMULATION_NAME}_place_orphan
+  NULL,                /* set_symbols */
+  NULL,                /* parse_args */
+  NULL,                /* unrecognized_file */
+  NULL,                /* list_options */
+  NULL         /* recognized_file */
 };
 EOF
index 96e0d2d9df4fc0778870f81336afd13b49486a58..c75b8e63fe14c912500c357d173abd5cbc9854f7 100644 (file)
@@ -1,5 +1,5 @@
 /* ldcref.c -- output a cross reference table
-   Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
    Written by Ian Lance Taylor <ian@cygnus.com>
 
 This file is part of GLD, the Gnu Linker.
@@ -151,7 +151,7 @@ add_cref (name, abfd, section, value)
      const char *name;
      bfd *abfd;
      asection *section;
-     bfd_vma value;
+     bfd_vma value ATTRIBUTE_UNUSED;
 {
   struct cref_hash_entry *h;
   struct cref_ref *r;
@@ -354,7 +354,7 @@ check_nocrossrefs ()
 static boolean
 check_nocrossref (h, ignore)
      struct cref_hash_entry *h;
-     PTR ignore;
+     PTR ignore ATTRIBUTE_UNUSED;
 {
   struct bfd_link_hash_entry *hl;
   asection *defsec;
index eab0432da3a194d6385d8a2d24ac1dbf13073b9a..85a2894581fda085365cb4dfed24b811308a94b8 100644 (file)
@@ -1,5 +1,6 @@
 /* ldemul.c -- clearing house for ld emulation states
-   Copyright (C) 1991, 92, 93, 94, 95, 96, 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 1999
+   Free Software Foundation, Inc.
 
 This file is part of GLD, the Gnu Linker.
 
@@ -218,7 +219,7 @@ set_output_arch_default()
 /*ARGSUSED*/
 void
 syslib_default(ignore)
-     char  *ignore;
+     char  *ignore ATTRIBUTE_UNUSED;
 {
   info_msg (_("%S SYSLIB ignored\n"));
 }
@@ -226,7 +227,7 @@ syslib_default(ignore)
 /*ARGSUSED*/
 void
 hll_default(ignore)
-     char  *ignore;
+     char  *ignore ATTRIBUTE_UNUSED;
 {
   info_msg (_("%S HLL ignored\n"));
 }
index 6c9d726ec1920fc2a7e2396d8468f518799f886f..121ed889d87945b515b1ff65560fb8915765728f 100644 (file)
@@ -1,6 +1,7 @@
 /* This module handles expression trees.
-Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
-Written by Steve Chamberlain of Cygnus Support (sac@cygnus.com).
+   Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 1999
+   Free Software Foundation, Inc.
+   Written by Steve Chamberlain of Cygnus Support (sac@cygnus.com).
 
 This file is part of GLD, the Gnu Linker.
 
@@ -967,7 +968,7 @@ exp_get_value_int (tree,def,name, allocation_done)
 bfd_vma
 exp_get_abs_int (tree, def, name, allocation_done)
      etree_type *tree;
-     int def;
+     int def ATTRIBUTE_UNUSED;
      char *name;
      lang_phase_type allocation_done;
 {
index d290391eff66c00f35818fa7f0c399a7c9a91203..8e7ae9d4d08a3ec139b2f990f1658a2adeeeaa5e 100644 (file)
@@ -155,7 +155,7 @@ static void walk_wild_file
 /* EXPORTS */
 lang_output_section_statement_type *abs_output_section;
 lang_statement_list_type *stat_ptr = &statement_list;
-lang_statement_list_type file_chain = { 0 };
+lang_statement_list_type file_chain = { NULL, NULL };
 const char *entry_symbol = NULL;
 boolean entry_from_cmdline;
 boolean lang_has_input_file = false;
@@ -1430,7 +1430,7 @@ wild (s, section, file, target, output)
      lang_wild_statement_type *s;
      const char *section;
      const char *file;
-     const char *target;
+     const char *target ATTRIBUTE_UNUSED;
      lang_output_section_statement_type *output;
 {
   walk_wild (s, section, file, output_section_callback, (void *) output);
@@ -2292,7 +2292,7 @@ size_input_section (this_ptr, output_section_statement, fill, dot, relax)
      lang_output_section_statement_type * output_section_statement;
      fill_type fill;
      bfd_vma dot;
-     boolean relax;
+     boolean relax ATTRIBUTE_UNUSED;
 {
   lang_input_section_type *is = &((*this_ptr)->input_section);
   asection *i = is->section;
@@ -3023,10 +3023,10 @@ lang_finish ()
 
 static void
 #ifdef ANSI_PROTOTYPES
-ignore_bfd_errors (const char *s, ...)
+ignore_bfd_errors (const char *s ATTRIBUTE_UNUSED, ...)
 #else
 ignore_bfd_errors (s)
-     const char *s;
+     const char *s ATTRIBUTE_UNUSED;
 #endif
 {
   /* Don't do anything.  */
@@ -3526,8 +3526,8 @@ static void
 gc_section_callback (ptr, section, file, data)
      lang_wild_statement_type *ptr;
      asection *section;
-     lang_input_statement_type *file;
-     void *data;
+     lang_input_statement_type *file ATTRIBUTE_UNUSED;
+     void *data ATTRIBUTE_UNUSED;
 {
   /* If the wild pattern was marked KEEP, the member sections
      should be as well.  */
index 7eef3e53f668d78cf6b6f5c1cd3d82c30aea8eb3..734bc32f05df22a0e71add713ec97dd57a37c9b8 100644 (file)
@@ -705,7 +705,7 @@ add_keepsyms_file (filename)
 /*ARGSUSED*/
 static boolean
 add_archive_element (info, abfd, name)
-     struct bfd_link_info *info;
+     struct bfd_link_info *info ATTRIBUTE_UNUSED;
      bfd *abfd;
      const char *name;
 {
@@ -820,7 +820,7 @@ add_archive_element (info, abfd, name)
 /*ARGSUSED*/
 static boolean
 multiple_definition (info, name, obfd, osec, oval, nbfd, nsec, nval)
-     struct bfd_link_info *info;
+     struct bfd_link_info *info ATTRIBUTE_UNUSED;
      const char *name;
      bfd *obfd;
      asection *osec;
@@ -857,7 +857,7 @@ multiple_definition (info, name, obfd, osec, oval, nbfd, nsec, nval)
 /*ARGSUSED*/
 static boolean
 multiple_common (info, name, obfd, otype, osize, nbfd, ntype, nsize)
-     struct bfd_link_info *info;
+     struct bfd_link_info *info ATTRIBUTE_UNUSED;
      const char *name;
      bfd *obfd;
      enum bfd_link_hash_type otype;
@@ -924,7 +924,7 @@ multiple_common (info, name, obfd, otype, osize, nbfd, ntype, nsize)
 /*ARGSUSED*/
 static boolean
 add_to_set (info, h, reloc, abfd, section, value)
-     struct bfd_link_info *info;
+     struct bfd_link_info *info ATTRIBUTE_UNUSED;
      struct bfd_link_hash_entry *h;
      bfd_reloc_code_real_type reloc;
      bfd *abfd;
@@ -1023,7 +1023,7 @@ struct warning_callback_info
 /*ARGSUSED*/
 static boolean
 warning_callback (info, warning, symbol, abfd, section, address)
-     struct bfd_link_info *info;
+     struct bfd_link_info *info ATTRIBUTE_UNUSED;
      const char *warning;
      const char *symbol;
      bfd *abfd;
@@ -1145,7 +1145,7 @@ warning_find_reloc (abfd, sec, iarg)
 /*ARGSUSED*/
 static boolean
 undefined_symbol (info, name, abfd, section, address)
-     struct bfd_link_info *info;
+     struct bfd_link_info *info ATTRIBUTE_UNUSED;
      const char *name;
      bfd *abfd;
      asection *section;
@@ -1217,7 +1217,7 @@ undefined_symbol (info, name, abfd, section, address)
 /*ARGSUSED*/
 static boolean
 reloc_overflow (info, name, reloc_name, addend, abfd, section, address)
-     struct bfd_link_info *info;
+     struct bfd_link_info *info ATTRIBUTE_UNUSED;
      const char *name;
      const char *reloc_name;
      bfd_vma addend;
@@ -1241,7 +1241,7 @@ reloc_overflow (info, name, reloc_name, addend, abfd, section, address)
 /*ARGSUSED*/
 static boolean
 reloc_dangerous (info, message, abfd, section, address)
-     struct bfd_link_info *info;
+     struct bfd_link_info *info ATTRIBUTE_UNUSED;
      const char *message;
      bfd *abfd;
      asection *section;
@@ -1261,7 +1261,7 @@ reloc_dangerous (info, message, abfd, section, address)
 /*ARGSUSED*/
 static boolean
 unattached_reloc (info, name, abfd, section, address)
-     struct bfd_link_info *info;
+     struct bfd_link_info *info ATTRIBUTE_UNUSED;
      const char *name;
      bfd *abfd;
      asection *section;