* Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED

as appropriate.  Fill in structure initializations.
This commit is contained in:
Ian Lance Taylor 1999-07-11 20:09:04 +00:00
parent 8622e41b9f
commit 87f2a3464b
7 changed files with 39 additions and 26 deletions

View 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.

View 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

View 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;

View 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"));
}

View 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;
{

View 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. */

View 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;