* Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
authorIan Lance Taylor <ian@airs.com>
Sun, 11 Jul 1999 19:49:48 +0000 (19:49 +0000)
committerIan Lance Taylor <ian@airs.com>
Sun, 11 Jul 1999 19:49:48 +0000 (19:49 +0000)
as appropriate.  Fill in structure initializations.  Add variable
initializations.  Add casts.
* dwarf1.c (parse_line_table): Change eachLine to unsigned long.
(dwarf1_unit_find_nearest_line): Change i to unsigned long.

26 files changed:
bfd/ChangeLog
bfd/aout-target.h
bfd/aoutx.h
bfd/archive.c
bfd/bfd.c
bfd/binary.c
bfd/coffgen.c
bfd/dwarf1.c
bfd/dwarf2.c
bfd/elf.c
bfd/elf32-gen.c
bfd/elf32-i386.c
bfd/elflink.c
bfd/elflink.h
bfd/hash.c
bfd/i386linux.c
bfd/ihex.c
bfd/libbfd.c
bfd/linker.c
bfd/reloc.c
bfd/section.c
bfd/srec.c
bfd/stabs.c
bfd/syms.c
bfd/tekhex.c
bfd/trad-core.c

index f9421e591978e755036c9fc4e87de82baf3734cc..c3b0f7bab74a01a02bf71c5675a1977c1b6b0f06 100644 (file)
@@ -1,5 +1,11 @@
 1999-07-11  Ian Lance Taylor  <ian@zembu.com>
 
 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.  Add variable
+       initializations.  Add casts.
+       * dwarf1.c (parse_line_table): Change eachLine to unsigned long.
+       (dwarf1_unit_find_nearest_line): Change i to unsigned long.
+
        * elf.c (bfd_elf_hash): Change parameter from unsigned char * to
        char *.
        * elf-bfd.h (bfd_elf_hash): Update declaration.
        * elf.c (bfd_elf_hash): Change parameter from unsigned char * to
        char *.
        * elf-bfd.h (bfd_elf_hash): Update declaration.
index 1aee07aada0c07a1973eca9d98995f37ab998ac5..876b30a95a37fd8cc2d00aacb7dfb4452f6bd2fe 100644 (file)
@@ -1,5 +1,5 @@
 /* Define a target vector and some small routines for a variant of a.out.
 /* Define a target vector and some small routines for a variant of a.out.
-   Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997
+   Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
    Free Software Foundation, Inc.
 
 This file is part of BFD, the Binary File Descriptor library.
    Free Software Foundation, Inc.
 
 This file is part of BFD, the Binary File Descriptor library.
@@ -234,9 +234,9 @@ static boolean MY_bfd_copy_private_section_data
 static boolean
 MY_bfd_copy_private_section_data (ibfd, isec, obfd, osec)
      bfd *ibfd;
 static boolean
 MY_bfd_copy_private_section_data (ibfd, isec, obfd, osec)
      bfd *ibfd;
-     asection *isec;
+     asection *isec ATTRIBUTE_UNUSED;
      bfd *obfd;
      bfd *obfd;
-     asection *osec;
+     asection *osec ATTRIBUTE_UNUSED;
 {
   if (bfd_get_flavour (ibfd) == bfd_target_aout_flavour
       && bfd_get_flavour (obfd) == bfd_target_aout_flavour)
 {
   if (bfd_get_flavour (ibfd) == bfd_target_aout_flavour
       && bfd_get_flavour (obfd) == bfd_target_aout_flavour)
index 2704eecccfe8976e2e7444400948d3e677a7e670..66b414f098b6ff795033981e28e5dbcdcbad9033 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD semi-generic back-end for a.out binaries.
 /* BFD semi-generic back-end for a.out binaries.
-   Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+   Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -228,28 +228,35 @@ HOWTO( 7,        0,  4,   64, true,  0, complain_overflow_signed,  0,"DISP64",    tr
 HOWTO( 8,             0,  2,    0, false, 0, complain_overflow_bitfield,0,"GOT_REL",   false,         0,0x00000000, false),
 HOWTO( 9,             0,  1,   16, false, 0, complain_overflow_bitfield,0,"BASE16",    false,0xffffffff,0xffffffff, false),
 HOWTO(10,             0,  2,   32, false, 0, complain_overflow_bitfield,0,"BASE32",    false,0xffffffff,0xffffffff, false),
 HOWTO( 8,             0,  2,    0, false, 0, complain_overflow_bitfield,0,"GOT_REL",   false,         0,0x00000000, false),
 HOWTO( 9,             0,  1,   16, false, 0, complain_overflow_bitfield,0,"BASE16",    false,0xffffffff,0xffffffff, false),
 HOWTO(10,             0,  2,   32, false, 0, complain_overflow_bitfield,0,"BASE32",    false,0xffffffff,0xffffffff, false),
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 },
+{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
   HOWTO(16,           0,  2,    0, false, 0, complain_overflow_bitfield,0,"JMP_TABLE", false,         0,0x00000000, false),
   HOWTO(16,           0,  2,    0, false, 0, complain_overflow_bitfield,0,"JMP_TABLE", false,         0,0x00000000, false),
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 }, { -1 }, { -1 }, { -1 }, { -1 }, { -1 }, { -1 }, { -1 },
+{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
   HOWTO(32,           0,  2,    0, false, 0, complain_overflow_bitfield,0,"RELATIVE",  false,         0,0x00000000, false),
   HOWTO(32,           0,  2,    0, false, 0, complain_overflow_bitfield,0,"RELATIVE",  false,         0,0x00000000, false),
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 },
+{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
   HOWTO(40,           0,  2,    0, false, 0, complain_overflow_bitfield,0,"BASEREL",   false,         0,0x00000000, false),
 };
 
   HOWTO(40,           0,  2,    0, false, 0, complain_overflow_bitfield,0,"BASEREL",   false,         0,0x00000000, false),
 };
 
@@ -1072,7 +1079,7 @@ boolean
 NAME(aout,adjust_sizes_and_vmas) (abfd, text_size, text_end)
      bfd *abfd;
      bfd_size_type *text_size;
 NAME(aout,adjust_sizes_and_vmas) (abfd, text_size, text_end)
      bfd *abfd;
      bfd_size_type *text_size;
-     file_ptr *text_end;
+     file_ptr *text_end ATTRIBUTE_UNUSED;
 {
   struct internal_exec *execp = exec_hdr (abfd);
 
 {
   struct internal_exec *execp = exec_hdr (abfd);
 
@@ -2531,16 +2538,16 @@ NAME(aout,get_symtab_upper_bound) (abfd)
 /*ARGSUSED*/
  alent *
 NAME(aout,get_lineno) (ignore_abfd, ignore_symbol)
 /*ARGSUSED*/
  alent *
 NAME(aout,get_lineno) (ignore_abfd, ignore_symbol)
-     bfd *ignore_abfd;
-     asymbol *ignore_symbol;
+     bfd *ignore_abfd ATTRIBUTE_UNUSED;
+     asymbol *ignore_symbol ATTRIBUTE_UNUSED;
 {
 {
-return (alent *)NULL;
+  return (alent *)NULL;
 }
 
 /*ARGSUSED*/
 void
 NAME(aout,get_symbol_info) (ignore_abfd, symbol, ret)
 }
 
 /*ARGSUSED*/
 void
 NAME(aout,get_symbol_info) (ignore_abfd, symbol, ret)
-     bfd *ignore_abfd;
+     bfd *ignore_abfd ATTRIBUTE_UNUSED;
      asymbol *symbol;
      symbol_info *ret;
 {
      asymbol *symbol;
      symbol_info *ret;
 {
@@ -2568,7 +2575,7 @@ NAME(aout,get_symbol_info) (ignore_abfd, symbol, ret)
 /*ARGSUSED*/
 void
 NAME(aout,print_symbol) (ignore_abfd, afile, symbol, how)
 /*ARGSUSED*/
 void
 NAME(aout,print_symbol) (ignore_abfd, afile, symbol, how)
-     bfd *ignore_abfd;
+     bfd *ignore_abfd ATTRIBUTE_UNUSED;
      PTR afile;
      asymbol *symbol;
      bfd_print_symbol_type how;
      PTR afile;
      asymbol *symbol;
      bfd_print_symbol_type how;
@@ -2878,7 +2885,7 @@ NAME(aout,find_nearest_line)
 int
 NAME(aout,sizeof_headers) (abfd, execable)
      bfd *abfd;
 int
 NAME(aout,sizeof_headers) (abfd, execable)
      bfd *abfd;
-     boolean execable;
+     boolean execable ATTRIBUTE_UNUSED;
 {
   return adata(abfd).exec_bytes_size;
 }
 {
   return adata(abfd).exec_bytes_size;
 }
@@ -4719,6 +4726,8 @@ aout_reloc_index_to_section (abfd, indx)
     default:
       abort ();
     }
     default:
       abort ();
     }
+  /*NOTREACHED*/
+  return NULL;
 }
 
 /* Relocate an a.out section using standard a.out relocs.  */
 }
 
 /* Relocate an a.out section using standard a.out relocs.  */
@@ -5493,7 +5502,7 @@ aout_link_reloc_link_order (finfo, o, p)
   int r_index;
   int r_extern;
   reloc_howto_type *howto;
   int r_index;
   int r_extern;
   reloc_howto_type *howto;
-  file_ptr *reloff_ptr;
+  file_ptr *reloff_ptr = NULL;
   struct reloc_std_external srel;
   struct reloc_ext_external erel;
   PTR rel_ptr;
   struct reloc_std_external srel;
   struct reloc_ext_external erel;
   PTR rel_ptr;
index ac5aeaf6220d8a8e03eeebcafaff835ab9b72ce5..19293af4573d5b15cff62a64a8387be62c0294ff 100644 (file)
@@ -1178,7 +1178,7 @@ normalize (abfd, file)
 #else
 static const char *
 normalize (abfd, file)
 #else
 static const char *
 normalize (abfd, file)
-     bfd *abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
      const char *file;
 {
   const char *filename = strrchr (file, '/');
      const char *file;
 {
   const char *filename = strrchr (file, '/');
index 597e8f0bc687aef1455fa6652f18e4b3b149d138..c6809d7986de72f85b3659e8eced75b7cb697634 100644 (file)
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -1,5 +1,5 @@
 /* Generic BFD library interface and support routines.
 /* Generic BFD library interface and support routines.
-   Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+   Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -618,7 +618,7 @@ DESCRIPTION
 /*ARGSUSED*/
 void
 bfd_set_reloc (ignore_abfd, asect, location, count)
 /*ARGSUSED*/
 void
 bfd_set_reloc (ignore_abfd, asect, location, count)
-     bfd *ignore_abfd;
+     bfd *ignore_abfd ATTRIBUTE_UNUSED;
      sec_ptr asect;
      arelent **location;
      unsigned int count;
      sec_ptr asect;
      arelent **location;
      unsigned int count;
index 6c63fff4adfc6d65592ad353608837760d8d3c21..b5b2fad3fbc7b1d74dbbe2ba2055bba643f945de 100644 (file)
@@ -58,7 +58,7 @@ static int binary_sizeof_headers PARAMS ((bfd *, boolean));
 
 static boolean
 binary_mkobject (abfd)
 
 static boolean
 binary_mkobject (abfd)
-     bfd *abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
 {
   return true;
 }
 {
   return true;
 }
@@ -112,7 +112,7 @@ binary_object_p (abfd)
 static boolean
 binary_get_section_contents (abfd, section, location, offset, count)
      bfd *abfd;
 static boolean
 binary_get_section_contents (abfd, section, location, offset, count)
      bfd *abfd;
-     asection *section;
+     asection *section ATTRIBUTE_UNUSED;
      PTR location;
      file_ptr offset;
      bfd_size_type count;
      PTR location;
      file_ptr offset;
      bfd_size_type count;
@@ -127,7 +127,7 @@ binary_get_section_contents (abfd, section, location, offset, count)
 
 static long
 binary_get_symtab_upper_bound (abfd)
 
 static long
 binary_get_symtab_upper_bound (abfd)
-     bfd *abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
 {
   return (BIN_SYMS + 1) * sizeof (asymbol *);
 }
 {
   return (BIN_SYMS + 1) * sizeof (asymbol *);
 }
@@ -222,7 +222,7 @@ binary_make_empty_symbol (abfd)
 
 static void
 binary_get_symbol_info (ignore_abfd, symbol, ret)
 
 static void
 binary_get_symbol_info (ignore_abfd, symbol, ret)
-     bfd *ignore_abfd;
+     bfd *ignore_abfd ATTRIBUTE_UNUSED;
      asymbol *symbol;
      symbol_info *ret;
 {
      asymbol *symbol;
      symbol_info *ret;
 {
@@ -318,8 +318,8 @@ binary_set_section_contents (abfd, sec, data, offset, size)
 
 static int
 binary_sizeof_headers (abfd, exec)
 
 static int
 binary_sizeof_headers (abfd, exec)
-     bfd *abfd;
-     boolean exec;
+     bfd *abfd ATTRIBUTE_UNUSED;
+     boolean exec ATTRIBUTE_UNUSED;
 {
   return 0;
 }
 {
   return 0;
 }
index a06ed663b3d264f3cfa359e100d97439749bac09..8495f3d7cef8ad045dc3182cb16e38f2a0999720 100644 (file)
@@ -1,5 +1,5 @@
 /* Support for the generic parts of COFF, for BFD.
 /* Support for the generic parts of COFF, for BFD.
-   Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+   Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -559,7 +559,7 @@ coff_count_linenumbers (abfd)
 /*ARGSUSED*/
 coff_symbol_type *
 coff_symbol_from (ignore_abfd, symbol)
 /*ARGSUSED*/
 coff_symbol_type *
 coff_symbol_from (ignore_abfd, symbol)
-     bfd *ignore_abfd;
+     bfd *ignore_abfd ATTRIBUTE_UNUSED;
      asymbol *symbol;
 {
   if (bfd_asymbol_flavour (symbol) != bfd_target_coff_flavour)
      asymbol *symbol;
 {
   if (bfd_asymbol_flavour (symbol) != bfd_target_coff_flavour)
@@ -1351,7 +1351,7 @@ coff_write_linenumbers (abfd)
 /*ARGSUSED */
 alent *
 coff_get_lineno (ignore_abfd, symbol)
 /*ARGSUSED */
 alent *
 coff_get_lineno (ignore_abfd, symbol)
-     bfd *ignore_abfd;
+     bfd *ignore_abfd ATTRIBUTE_UNUSED;
      asymbol *symbol;
 {
   return coffsymbol (symbol)->lineno;
      asymbol *symbol;
 {
   return coffsymbol (symbol)->lineno;
@@ -1857,8 +1857,8 @@ coff_make_empty_symbol (abfd)
 asymbol *
 coff_bfd_make_debug_symbol (abfd, ptr, sz)
      bfd *abfd;
 asymbol *
 coff_bfd_make_debug_symbol (abfd, ptr, sz)
      bfd *abfd;
-     PTR ptr;
-     unsigned long sz;
+     PTR ptr ATTRIBUTE_UNUSED;
+     unsigned long sz ATTRIBUTE_UNUSED;
 {
   coff_symbol_type *new = (coff_symbol_type *) bfd_alloc (abfd, sizeof (coff_symbol_type));
   if (new == NULL)
 {
   coff_symbol_type *new = (coff_symbol_type *) bfd_alloc (abfd, sizeof (coff_symbol_type));
   if (new == NULL)
@@ -2105,7 +2105,7 @@ coff_print_symbol (abfd, filep, symbol, how)
 
 boolean
 _bfd_coff_is_local_label_name (abfd, name)
 
 boolean
 _bfd_coff_is_local_label_name (abfd, name)
-     bfd *abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
      const char *name;
 {
   return name[0] == '.' && name[1] == 'L';
      const char *name;
 {
   return name[0] == '.' && name[1] == 'L';
index d87df92c10f3d2619501c8e31269b40a4d9910cc..903bfc38ab5a631dad3054a2e4504f484ff92f9a 100644 (file)
@@ -1,5 +1,5 @@
 /* DWARF 1 find nearest line (_bfd_dwarf1_find_nearest_line).
 /* DWARF 1 find nearest line (_bfd_dwarf1_find_nearest_line).
-   Copyright 1998 Free Software Foundation, Inc.
+   Copyright 1998, 1999 Free Software Foundation, Inc.
 
 Written by Gavin Romig-Koch of Cygnus Solutions (gavin@cygnus.com).  
 
 
 Written by Gavin Romig-Koch of Cygnus Solutions (gavin@cygnus.com).  
 
@@ -291,7 +291,7 @@ parse_line_table (stash, aUnit)
   xptr = stash->line_section + aUnit->stmt_list_offset;
   if (xptr < stash->line_section_end)
     {
   xptr = stash->line_section + aUnit->stmt_list_offset;
   if (xptr < stash->line_section_end)
     {
-      int eachLine;
+      unsigned long eachLine;
 
       char* tblend;
       unsigned long base;
 
       char* tblend;
       unsigned long base;
@@ -398,7 +398,7 @@ dwarf1_unit_find_nearest_line (stash, aUnit, addr,
     {
       if (aUnit->has_stmt_list)
        {
     {
       if (aUnit->has_stmt_list)
        {
-         int i;
+         unsigned long i;
          struct dwarf1_func* eachFunc;
 
          if (! aUnit->linenumber_table)
          struct dwarf1_func* eachFunc;
 
          if (! aUnit->linenumber_table)
@@ -454,7 +454,7 @@ _bfd_dwarf1_find_nearest_line (abfd, section, symbols, offset,
                               filename_ptr, functionname_ptr, linenumber_ptr)
      bfd *abfd;
      asection *section;
                               filename_ptr, functionname_ptr, linenumber_ptr)
      bfd *abfd;
      asection *section;
-     asymbol **symbols;
+     asymbol **symbols ATTRIBUTE_UNUSED;
      bfd_vma offset;
      const char **filename_ptr;
      const char **functionname_ptr;
      bfd_vma offset;
      const char **filename_ptr;
      const char **functionname_ptr;
index 16986ad38eaccb697074f0b360ab7bc02d77328c..143c3fa1d8cd91e22a28c4d38713cebd4b94aeb2 100644 (file)
@@ -1,5 +1,5 @@
 /* DWARF 2 support.
 /* DWARF 2 support.
-   Copyright 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+   Copyright 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
 
    Adapted from gdb/dwarf2read.c by Gavin Koch of Cygnus Solutions
    (gavin@cygnus.com).
 
    Adapted from gdb/dwarf2read.c by Gavin Koch of Cygnus Solutions
    (gavin@cygnus.com).
@@ -170,7 +170,7 @@ struct comp_unit {
 
 static unsigned int
 read_1_byte (abfd, buf)
 
 static unsigned int
 read_1_byte (abfd, buf)
-     bfd *abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
      char *buf;
 {
   return bfd_get_8 (abfd, (bfd_byte *) buf);
      char *buf;
 {
   return bfd_get_8 (abfd, (bfd_byte *) buf);
@@ -178,7 +178,7 @@ read_1_byte (abfd, buf)
 
 static int
 read_1_signed_byte (abfd, buf)
 
 static int
 read_1_signed_byte (abfd, buf)
-     bfd *abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
      char *buf;
 {
   return bfd_get_signed_8 (abfd, (bfd_byte *) buf);
      char *buf;
 {
   return bfd_get_signed_8 (abfd, (bfd_byte *) buf);
@@ -238,9 +238,9 @@ read_8_bytes (abfd, buf)
 
 static char *
 read_n_bytes (abfd, buf, size)
 
 static char *
 read_n_bytes (abfd, buf, size)
-     bfd * abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
      char *buf;
      char *buf;
-     unsigned int size;
+     unsigned int size ATTRIBUTE_UNUSED;
 {
   /* If the size of a host char is 8 bits, we can return a pointer
      to the buffer, otherwise we have to copy the data to a buffer
 {
   /* If the size of a host char is 8 bits, we can return a pointer
      to the buffer, otherwise we have to copy the data to a buffer
@@ -250,7 +250,7 @@ read_n_bytes (abfd, buf, size)
 
 static char *
 read_string (abfd, buf, bytes_read_ptr)
 
 static char *
 read_string (abfd, buf, bytes_read_ptr)
-     bfd *abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
      char *buf;
      unsigned int *bytes_read_ptr;
 {
      char *buf;
      unsigned int *bytes_read_ptr;
 {
@@ -268,7 +268,7 @@ read_string (abfd, buf, bytes_read_ptr)
 
 static unsigned int
 read_unsigned_leb128 (abfd, buf, bytes_read_ptr)
 
 static unsigned int
 read_unsigned_leb128 (abfd, buf, bytes_read_ptr)
-     bfd *abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
      char *buf;
      unsigned int *bytes_read_ptr;
 {
      char *buf;
      unsigned int *bytes_read_ptr;
 {
@@ -298,8 +298,8 @@ read_unsigned_leb128 (abfd, buf, bytes_read_ptr)
 
 static int
 read_signed_leb128 (abfd, buf, bytes_read_ptr)
 
 static int
 read_signed_leb128 (abfd, buf, bytes_read_ptr)
-     bfd * abfd;
-     char * buf;
+     bfd *abfd ATTRIBUTE_UNUSED;
+     char *buf;
      unsigned int * bytes_read_ptr;
 {
   int           result;
      unsigned int * bytes_read_ptr;
 {
   int           result;
@@ -1236,7 +1236,7 @@ parse_comp_unit (abfd, info_ptr, end_ptr, abbrev_length)
   struct comp_unit* unit;
 
   unsigned short version;
   struct comp_unit* unit;
 
   unsigned short version;
-  unsigned int abbrev_offset;
+  unsigned int abbrev_offset = 0;
   unsigned char addr_size;
   struct abbrev_info** abbrevs;
 
   unsigned char addr_size;
   struct abbrev_info** abbrevs;
 
@@ -1457,7 +1457,7 @@ _bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
                               addr_size)
      bfd *abfd;
      asection *section;
                               addr_size)
      bfd *abfd;
      asection *section;
-     asymbol **symbols;
+     asymbol **symbols ATTRIBUTE_UNUSED;
      bfd_vma offset;
      const char **filename_ptr;
      const char **functionname_ptr;
      bfd_vma offset;
      const char **filename_ptr;
      const char **functionname_ptr;
index 65bba6124aac5c75505e2e70c2154803c2356436..025fb8e05e0c4f52b8870fc76b179efe29d6e15b 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -505,13 +505,13 @@ bfd_elf_generic_reloc (abfd,
                       input_section,
                       output_bfd,
                       error_message)
                       input_section,
                       output_bfd,
                       error_message)
-     bfd *abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
      arelent *reloc_entry;
      asymbol *symbol;
      arelent *reloc_entry;
      asymbol *symbol;
-     PTR data;
+     PTR data ATTRIBUTE_UNUSED;
      asection *input_section;
      bfd *output_bfd;
      asection *input_section;
      bfd *output_bfd;
-     char **error_message;
+     char **error_message ATTRIBUTE_UNUSED;
 {
   if (output_bfd != (bfd *) NULL
       && (symbol->flags & BSF_SECTION_SYM) == 0
 {
   if (output_bfd != (bfd *) NULL
       && (symbol->flags & BSF_SECTION_SYM) == 0
@@ -946,7 +946,7 @@ bfd_elf_set_dt_needed_name (abfd, name)
 
 struct bfd_link_needed_list *
 bfd_elf_get_needed_list (abfd, info)
 
 struct bfd_link_needed_list *
 bfd_elf_get_needed_list (abfd, info)
-     bfd *abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
      struct bfd_link_info *info;
 {
   if (info->hash->creator->flavour != bfd_target_elf_flavour)
      struct bfd_link_info *info;
 {
   if (info->hash->creator->flavour != bfd_target_elf_flavour)
@@ -4193,7 +4193,7 @@ _bfd_elf_get_dynamic_symtab_upper_bound (abfd)
 
 long
 _bfd_elf_get_reloc_upper_bound (abfd, asect)
 
 long
 _bfd_elf_get_reloc_upper_bound (abfd, asect)
-     bfd *abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
      sec_ptr asect;
 {
   return (asect->reloc_count + 1) * sizeof (arelent *);
      sec_ptr asect;
 {
   return (asect->reloc_count + 1) * sizeof (arelent *);
@@ -4524,7 +4524,7 @@ _bfd_elf_make_empty_symbol (abfd)
 
 void
 _bfd_elf_get_symbol_info (ignore_abfd, symbol, ret)
 
 void
 _bfd_elf_get_symbol_info (ignore_abfd, symbol, ret)
-     bfd *ignore_abfd;
+     bfd *ignore_abfd ATTRIBUTE_UNUSED;
      asymbol *symbol;
      symbol_info *ret;
 {
      asymbol *symbol;
      symbol_info *ret;
 {
@@ -4537,7 +4537,7 @@ _bfd_elf_get_symbol_info (ignore_abfd, symbol, ret)
 
 boolean
 _bfd_elf_is_local_label_name (abfd, name)
 
 boolean
 _bfd_elf_is_local_label_name (abfd, name)
-     bfd *abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
      const char *name;
 {
   /* Normal local symbols start with ``.L''.  */
      const char *name;
 {
   /* Normal local symbols start with ``.L''.  */
@@ -4563,8 +4563,8 @@ _bfd_elf_is_local_label_name (abfd, name)
 
 alent *
 _bfd_elf_get_lineno (ignore_abfd, symbol)
 
 alent *
 _bfd_elf_get_lineno (ignore_abfd, symbol)
-     bfd *ignore_abfd;
-     asymbol *symbol;
+     bfd *ignore_abfd ATTRIBUTE_UNUSED;
+     asymbol *symbol ATTRIBUTE_UNUSED;
 {
   abort ();
   return NULL;
 {
   abort ();
   return NULL;
@@ -4714,9 +4714,9 @@ _bfd_elf_set_section_contents (abfd, section, location, offset, count)
 
 void
 _bfd_elf_no_info_to_howto (abfd, cache_ptr, dst)
 
 void
 _bfd_elf_no_info_to_howto (abfd, cache_ptr, dst)
-     bfd *abfd;
-     arelent *cache_ptr;
-     Elf_Internal_Rela *dst;
+     bfd *abfd ATTRIBUTE_UNUSED;
+     arelent *cache_ptr ATTRIBUTE_UNUSED;
+     Elf_Internal_Rela *dst ATTRIBUTE_UNUSED;
 {
   abort ();
 }
 {
   abort ();
 }
@@ -4850,13 +4850,13 @@ _bfd_elf_close_and_cleanup (abfd)
 
 bfd_reloc_status_type
 _bfd_elf_rel_vtable_reloc_fn (abfd, re, symbol, data, is, obfd, errmsg)
 
 bfd_reloc_status_type
 _bfd_elf_rel_vtable_reloc_fn (abfd, re, symbol, data, is, obfd, errmsg)
-     bfd *abfd;
-     arelent *re;
-     struct symbol_cache_entry *symbol;
-     PTR data;
-     asection *is;
-     bfd *obfd;
-     char **errmsg;
+     bfd *abfd ATTRIBUTE_UNUSED;
+     arelent *re ATTRIBUTE_UNUSED;
+     struct symbol_cache_entry *symbol ATTRIBUTE_UNUSED;
+     PTR data ATTRIBUTE_UNUSED;
+     asection *is ATTRIBUTE_UNUSED;
+     bfd *obfd ATTRIBUTE_UNUSED;
+     char **errmsg ATTRIBUTE_UNUSED;
 {
   return bfd_reloc_ok;
 }
 {
   return bfd_reloc_ok;
 }
index 7ed35ae3895c47fcd0c8c0f12358bf10e7bd3abc..47da53b1bc68a038d3b1bbb0181559b70fbc8e1c 100644 (file)
@@ -1,5 +1,5 @@
 /* Generic support for 32-bit ELF
 /* Generic support for 32-bit ELF
-   Copyright 1993, 1995, 1998 Free Software Foundation, Inc.
+   Copyright 1993, 1995, 1998, 1999 Free Software Foundation, Inc.
 
 This file is part of BFD, the Binary File Descriptor library.
 
 
 This file is part of BFD, the Binary File Descriptor library.
 
@@ -42,18 +42,18 @@ static reloc_howto_type dummy =
 
 static void
 elf_generic_info_to_howto (abfd, bfd_reloc, elf_reloc)
 
 static void
 elf_generic_info_to_howto (abfd, bfd_reloc, elf_reloc)
-     bfd *abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
      arelent *bfd_reloc;
      arelent *bfd_reloc;
-     Elf32_Internal_Rela *elf_reloc;
+     Elf32_Internal_Rela *elf_reloc ATTRIBUTE_UNUSED;
 {
   bfd_reloc->howto = &dummy;
 }
 
 static void
 elf_generic_info_to_howto_rel (abfd, bfd_reloc, elf_reloc)
 {
   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;
      arelent *bfd_reloc;
-     Elf32_Internal_Rel *elf_reloc;
+     Elf32_Internal_Rel *elf_reloc ATTRIBUTE_UNUSED;
 {
   bfd_reloc->howto = &dummy;
 }
 {
   bfd_reloc->howto = &dummy;
 }
index a8496b128cbaee8209746513d72b349679066e66..ed3101d3c5dc90b1121e3aac7d15f60589ca5581 100644 (file)
@@ -67,15 +67,15 @@ static reloc_howto_type elf_howto_table[]=
   HOWTO(R_386_RELATIVE,  0,2,32,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_RELATIVE", true,0xffffffff,0xffffffff,false),
   HOWTO(R_386_GOTOFF,    0,2,32,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_GOTOFF",   true,0xffffffff,0xffffffff,false),
   HOWTO(R_386_GOTPC,     0,2,32,true,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_GOTPC",    true,0xffffffff,0xffffffff,true),
   HOWTO(R_386_RELATIVE,  0,2,32,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_RELATIVE", true,0xffffffff,0xffffffff,false),
   HOWTO(R_386_GOTOFF,    0,2,32,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_GOTOFF",   true,0xffffffff,0xffffffff,false),
   HOWTO(R_386_GOTPC,     0,2,32,true,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_GOTPC",    true,0xffffffff,0xffffffff,true),
-  { 11 },
-  { 12 },
-  { 13 },
-  { 14 },
-  { 15 },
-  { 16 },
-  { 17 },
-  { 18 },
-  { 19 },
+  { 11, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+  { 12, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+  { 13, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+  { 14, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+  { 15, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+  { 16, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+  { 17, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+  { 18, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
+  { 19, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
   /* The remaining relocs are a GNU extension.  */
   HOWTO(R_386_16,       0,1,16,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_16",       true,0xffff,0xffff,false),
   HOWTO(R_386_PC16,     0,1,16,true, 0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_PC16",     true,0xffff,0xffff,true),
   /* The remaining relocs are a GNU extension.  */
   HOWTO(R_386_16,       0,1,16,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_16",       true,0xffff,0xffff,false),
   HOWTO(R_386_PC16,     0,1,16,true, 0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_PC16",     true,0xffff,0xffff,true),
@@ -123,7 +123,7 @@ static reloc_howto_type elf32_i386_vtentry_howto =
 
 static reloc_howto_type *
 elf_i386_reloc_type_lookup (abfd, code)
 
 static reloc_howto_type *
 elf_i386_reloc_type_lookup (abfd, code)
-     bfd *abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
      bfd_reloc_code_real_type code;
 {
   switch (code)
      bfd_reloc_code_real_type code;
 {
   switch (code)
@@ -211,16 +211,16 @@ elf_i386_reloc_type_lookup (abfd, code)
 
 static void
 elf_i386_info_to_howto (abfd, cache_ptr, dst)
 
 static void
 elf_i386_info_to_howto (abfd, cache_ptr, dst)
-     bfd               *abfd;
-     arelent           *cache_ptr;
-     Elf32_Internal_Rela *dst;
+     bfd               *abfd ATTRIBUTE_UNUSED;
+     arelent           *cache_ptr ATTRIBUTE_UNUSED;
+     Elf32_Internal_Rela *dst ATTRIBUTE_UNUSED;
 {
   abort ();
 }
 
 static void
 elf_i386_info_to_howto_rel (abfd, cache_ptr, dst)
 {
   abort ();
 }
 
 static void
 elf_i386_info_to_howto_rel (abfd, cache_ptr, dst)
-     bfd *abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
      arelent *cache_ptr;
      Elf32_Internal_Rel *dst;
 {
      arelent *cache_ptr;
      Elf32_Internal_Rel *dst;
 {
@@ -714,7 +714,7 @@ elf_i386_check_relocs (abfd, info, sec, relocs)
 static asection *
 elf_i386_gc_mark_hook (abfd, info, rel, h, sym)
      bfd *abfd;
 static asection *
 elf_i386_gc_mark_hook (abfd, info, rel, h, sym)
      bfd *abfd;
-     struct bfd_link_info *info;
+     struct bfd_link_info *info ATTRIBUTE_UNUSED;
      Elf_Internal_Rela *rel;
      struct elf_link_hash_entry *h;
      Elf_Internal_Sym *sym;
      Elf_Internal_Rela *rel;
      struct elf_link_hash_entry *h;
      Elf_Internal_Sym *sym;
@@ -760,10 +760,10 @@ elf_i386_gc_mark_hook (abfd, info, rel, h, sym)
 
 static boolean
 elf_i386_gc_sweep_hook (abfd, info, sec, relocs)
 
 static boolean
 elf_i386_gc_sweep_hook (abfd, info, sec, relocs)
-     bfd *abfd;
-     struct bfd_link_info *info;
-     asection *sec;
-     const Elf_Internal_Rela *relocs;
+     bfd *abfd ATTRIBUTE_UNUSED;
+     struct bfd_link_info *info ATTRIBUTE_UNUSED;
+     asection *sec ATTRIBUTE_UNUSED;
+     const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED;
 {
   /* ??? It would seem that the existing i386 code does no sort
      of reference counting or whatnot on its GOT and PLT entries,
 {
   /* ??? It would seem that the existing i386 code does no sort
      of reference counting or whatnot on its GOT and PLT entries,
@@ -1139,7 +1139,7 @@ elf_i386_size_dynamic_sections (output_bfd, info)
 static boolean
 elf_i386_discard_copies (h, ignore)
      struct elf_i386_link_hash_entry *h;
 static boolean
 elf_i386_discard_copies (h, ignore)
      struct elf_i386_link_hash_entry *h;
-     PTR ignore;
+     PTR ignore ATTRIBUTE_UNUSED;
 {
   struct elf_i386_pcrel_relocs_copied *s;
 
 {
   struct elf_i386_pcrel_relocs_copied *s;
 
index d644e1b4c2c30876a7d8644f08ef19490b6ecec5..e26dedd6ce4140aa64b7217c7eade30306014c62 100644 (file)
@@ -1,5 +1,5 @@
 /* ELF linking support for BFD.
 /* ELF linking support for BFD.
-   Copyright 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
+   Copyright 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
 
 This file is part of BFD, the Binary File Descriptor library.
 
 
 This file is part of BFD, the Binary File Descriptor library.
 
@@ -100,7 +100,7 @@ _bfd_elf_create_dynamic_sections (abfd, info)
   flagword flags, pltflags;
   register asection *s;
   struct elf_backend_data *bed = get_elf_backend_data (abfd);
   flagword flags, pltflags;
   register asection *s;
   struct elf_backend_data *bed = get_elf_backend_data (abfd);
-  int ptralign;
+  int ptralign = 0;
 
   switch (bed->s->arch_size)
     {
 
   switch (bed->s->arch_size)
     {
index fc07d7d8eae79d0ce84dfc92c722300520565b52..26fee850aa9ef5c12dcfac05356a72788d352520 100644 (file)
@@ -2237,7 +2237,7 @@ NAME(_bfd_elf,link_read_relocs) (abfd, o, external_relocs, internal_relocs,
 /*ARGSUSED*/
 boolean
 NAME(bfd_elf,record_link_assignment) (output_bfd, info, name, provide)
 /*ARGSUSED*/
 boolean
 NAME(bfd_elf,record_link_assignment) (output_bfd, info, name, provide)
-     bfd *output_bfd;
+     bfd *output_bfd ATTRIBUTE_UNUSED;
      struct bfd_link_info *info;
      const char *name;
      boolean provide;
      struct bfd_link_info *info;
      const char *name;
      boolean provide;
@@ -2356,7 +2356,7 @@ compute_bucket_count (info)
      struct bfd_link_info *info;
 {
   size_t dynsymcount = elf_hash_table (info)->dynsymcount;
      struct bfd_link_info *info;
 {
   size_t dynsymcount = elf_hash_table (info)->dynsymcount;
-  size_t best_size;
+  size_t best_size = 0;
   unsigned long int *hashcodes;
   unsigned long int *hashcodesp;
   unsigned long int i;
   unsigned long int *hashcodes;
   unsigned long int *hashcodesp;
   unsigned long int i;
@@ -4849,7 +4849,7 @@ elf_link_output_relocs (output_bfd, input_section, input_rel_hdr,
   Elf_Internal_Rela *irelaend;
   Elf_Internal_Shdr *output_rel_hdr;
   asection *output_section;
   Elf_Internal_Rela *irelaend;
   Elf_Internal_Shdr *output_rel_hdr;
   asection *output_section;
-  unsigned int *rel_countp;
+  unsigned int *rel_countp = NULL;
 
   output_section = input_section->output_section;
   output_rel_hdr = NULL;
 
   output_section = input_section->output_section;
   output_rel_hdr = NULL;
@@ -6183,8 +6183,8 @@ win:
 
 boolean
 elf_gc_record_vtentry (abfd, sec, h, addend)
 
 boolean
 elf_gc_record_vtentry (abfd, sec, h, addend)
-     bfd *abfd;
-     asection *sec;
+     bfd *abfd ATTRIBUTE_UNUSED;
+     asection *sec ATTRIBUTE_UNUSED;
      struct elf_link_hash_entry *h;
      bfd_vma addend;
 {
      struct elf_link_hash_entry *h;
      bfd_vma addend;
 {
index 097304037df3cde37240aae71f41cb7e15cc70b3..173eaf76eef636e2f7de7f376348e14d7de1d6d0 100644 (file)
@@ -1,5 +1,5 @@
 /* hash.c -- hash table routines for BFD
 /* hash.c -- hash table routines for BFD
-   Copyright (C) 1993, 94, 95, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1993, 94, 95, 97, 1999 Free Software Foundation, Inc.
    Written by Steve Chamberlain <sac@cygnus.com>
 
 This file is part of BFD, the Binary File Descriptor library.
    Written by Steve Chamberlain <sac@cygnus.com>
 
 This file is part of BFD, the Binary File Descriptor library.
@@ -450,7 +450,7 @@ struct bfd_hash_entry *
 bfd_hash_newfunc (entry, table, string)
      struct bfd_hash_entry *entry;
      struct bfd_hash_table *table;
 bfd_hash_newfunc (entry, table, string)
      struct bfd_hash_entry *entry;
      struct bfd_hash_table *table;
-     const char *string;
+     const char *string ATTRIBUTE_UNUSED;
 {
   if (entry == (struct bfd_hash_entry *) NULL)
     entry = ((struct bfd_hash_entry *)
 {
   if (entry == (struct bfd_hash_entry *) NULL)
     entry = ((struct bfd_hash_entry *)
index 804bdcd1c1a43e0172b0077efca0e1df2ca6684e..5df2a11c50f6eef1a4cc9f6e4b2a2d917ae0d7ae 100644 (file)
@@ -1,5 +1,6 @@
 /* BFD back-end for linux flavored i386 a.out binaries.
 /* BFD back-end for linux flavored i386 a.out binaries.
-   Copyright (C) 1992, 93, 94, 95, 96, 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999
+   Free Software Foundation, Inc.
 
 This file is part of BFD, the Binary File Descriptor library.
 
 
 This file is part of BFD, the Binary File Descriptor library.
 
@@ -297,7 +298,7 @@ new_fixup (info, h, value, builtin)
 static boolean
 linux_link_create_dynamic_sections (abfd, info)
      bfd *abfd;
 static boolean
 linux_link_create_dynamic_sections (abfd, info)
      bfd *abfd;
-     struct bfd_link_info *info;
+     struct bfd_link_info *info ATTRIBUTE_UNUSED;
 {
   flagword flags;
   register asection *s;
 {
   flagword flags;
   register asection *s;
index b9953d329f5d23b00a44c850c0666da4f2f629c2..5eb3862b44832cb293c428beeb5aa093e761558a 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for Intel Hex objects.
 /* BFD back-end for Intel Hex objects.
-   Copyright 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+   Copyright 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
    Written by Ian Lance Taylor of Cygnus Support <ian@cygnus.com>.
 
 This file is part of BFD, the Binary File Descriptor library.
    Written by Ian Lance Taylor of Cygnus Support <ian@cygnus.com>.
 
 This file is part of BFD, the Binary File Descriptor library.
@@ -947,8 +947,8 @@ ihex_set_arch_mach (abfd, arch, mach)
 /*ARGSUSED*/
 static int
 ihex_sizeof_headers (abfd, exec)
 /*ARGSUSED*/
 static int
 ihex_sizeof_headers (abfd, exec)
-     bfd *abfd;
-     boolean exec;
+     bfd *abfd ATTRIBUTE_UNUSED;
+     boolean exec ATTRIBUTE_UNUSED;
 {
   return 0;
 }
 {
   return 0;
 }
index d2fee39edeb91dc83fb64cd8d46d3376286dcfcd..d2baa5b3a2c927cd9739a1db7f2404946dc95633 100644 (file)
@@ -1,5 +1,5 @@
 /* Assorted BFD support routines, only used internally.
 /* Assorted BFD support routines, only used internally.
-   Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+   Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -45,7 +45,7 @@ DESCRIPTION
 /*ARGSUSED*/
 boolean
 bfd_false (ignore)
 /*ARGSUSED*/
 boolean
 bfd_false (ignore)
-     bfd *ignore;
+     bfd *ignore ATTRIBUTE_UNUSED;
 {
   bfd_set_error (bfd_error_invalid_operation);
   return false;
 {
   bfd_set_error (bfd_error_invalid_operation);
   return false;
@@ -57,7 +57,7 @@ bfd_false (ignore)
 /*ARGSUSED*/
 boolean
 bfd_true (ignore)
 /*ARGSUSED*/
 boolean
 bfd_true (ignore)
-     bfd *ignore;
+     bfd *ignore ATTRIBUTE_UNUSED;
 {
   return true;
 }
 {
   return true;
 }
@@ -68,7 +68,7 @@ bfd_true (ignore)
 /*ARGSUSED*/
 PTR
 bfd_nullvoidptr (ignore)
 /*ARGSUSED*/
 PTR
 bfd_nullvoidptr (ignore)
-     bfd *ignore;
+     bfd *ignore ATTRIBUTE_UNUSED;
 {
   bfd_set_error (bfd_error_invalid_operation);
   return NULL;
 {
   bfd_set_error (bfd_error_invalid_operation);
   return NULL;
@@ -77,7 +77,7 @@ bfd_nullvoidptr (ignore)
 /*ARGSUSED*/
 int 
 bfd_0 (ignore)
 /*ARGSUSED*/
 int 
 bfd_0 (ignore)
-     bfd *ignore;
+     bfd *ignore ATTRIBUTE_UNUSED;
 {
   return 0;
 }
 {
   return 0;
 }
@@ -85,7 +85,7 @@ bfd_0 (ignore)
 /*ARGSUSED*/
 unsigned int 
 bfd_0u (ignore)
 /*ARGSUSED*/
 unsigned int 
 bfd_0u (ignore)
-     bfd *ignore;
+     bfd *ignore ATTRIBUTE_UNUSED;
 {
    return 0;
 }
 {
    return 0;
 }
@@ -93,7 +93,7 @@ bfd_0u (ignore)
 /*ARGUSED*/
 long
 bfd_0l (ignore)
 /*ARGUSED*/
 long
 bfd_0l (ignore)
-     bfd *ignore;
+     bfd *ignore ATTRIBUTE_UNUSED;
 {
   return 0;
 }
 {
   return 0;
 }
@@ -104,7 +104,7 @@ bfd_0l (ignore)
 /*ARGSUSED*/
 long
 _bfd_n1 (ignore_abfd)
 /*ARGSUSED*/
 long
 _bfd_n1 (ignore_abfd)
-     bfd *ignore_abfd;
+     bfd *ignore_abfd ATTRIBUTE_UNUSED;
 {
   bfd_set_error (bfd_error_invalid_operation);
   return -1;
 {
   bfd_set_error (bfd_error_invalid_operation);
   return -1;
@@ -113,15 +113,15 @@ _bfd_n1 (ignore_abfd)
 /*ARGSUSED*/
 void 
 bfd_void (ignore)
 /*ARGSUSED*/
 void 
 bfd_void (ignore)
-     bfd *ignore;
+     bfd *ignore ATTRIBUTE_UNUSED;
 {
 }
 
 /*ARGSUSED*/
 boolean
 _bfd_nocore_core_file_matches_executable_p (ignore_core_bfd, ignore_exec_bfd)
 {
 }
 
 /*ARGSUSED*/
 boolean
 _bfd_nocore_core_file_matches_executable_p (ignore_core_bfd, ignore_exec_bfd)
-     bfd *ignore_core_bfd;
-     bfd *ignore_exec_bfd;
+     bfd *ignore_core_bfd ATTRIBUTE_UNUSED;
+     bfd *ignore_exec_bfd ATTRIBUTE_UNUSED;
 {
   bfd_set_error (bfd_error_invalid_operation);
   return false;
 {
   bfd_set_error (bfd_error_invalid_operation);
   return false;
@@ -133,7 +133,7 @@ _bfd_nocore_core_file_matches_executable_p (ignore_core_bfd, ignore_exec_bfd)
 /*ARGSUSED*/
 char *
 _bfd_nocore_core_file_failing_command (ignore_abfd)
 /*ARGSUSED*/
 char *
 _bfd_nocore_core_file_failing_command (ignore_abfd)
-     bfd *ignore_abfd;
+     bfd *ignore_abfd ATTRIBUTE_UNUSED;
 {
   bfd_set_error (bfd_error_invalid_operation);
   return (char *)NULL;
 {
   bfd_set_error (bfd_error_invalid_operation);
   return (char *)NULL;
@@ -145,7 +145,7 @@ _bfd_nocore_core_file_failing_command (ignore_abfd)
 /*ARGSUSED*/
 int
 _bfd_nocore_core_file_failing_signal (ignore_abfd)
 /*ARGSUSED*/
 int
 _bfd_nocore_core_file_failing_signal (ignore_abfd)
-     bfd *ignore_abfd;
+     bfd *ignore_abfd ATTRIBUTE_UNUSED;
 {
   bfd_set_error (bfd_error_invalid_operation);
   return 0;
 {
   bfd_set_error (bfd_error_invalid_operation);
   return 0;
@@ -154,7 +154,7 @@ _bfd_nocore_core_file_failing_signal (ignore_abfd)
 /*ARGSUSED*/
 const bfd_target *
 _bfd_dummy_target (ignore_abfd)
 /*ARGSUSED*/
 const bfd_target *
 _bfd_dummy_target (ignore_abfd)
-     bfd *ignore_abfd;
+     bfd *ignore_abfd ATTRIBUTE_UNUSED;
 {
   bfd_set_error (bfd_error_wrong_format);
   return 0;
 {
   bfd_set_error (bfd_error_wrong_format);
   return 0;
@@ -1003,7 +1003,7 @@ bfd_getl_signed_32 (addr)
 
 bfd_vma
 bfd_getb64 (addr)
 
 bfd_vma
 bfd_getb64 (addr)
-     register const bfd_byte *addr;
+     register const bfd_byte *addr ATTRIBUTE_UNUSED;
 {
 #ifdef BFD64
   bfd_vma low, high;
 {
 #ifdef BFD64
   bfd_vma low, high;
@@ -1027,7 +1027,7 @@ bfd_getb64 (addr)
 
 bfd_vma
 bfd_getl64 (addr)
 
 bfd_vma
 bfd_getl64 (addr)
-     register const bfd_byte *addr;
+     register const bfd_byte *addr ATTRIBUTE_UNUSED;
 {
 #ifdef BFD64
   bfd_vma low, high;
 {
 #ifdef BFD64
   bfd_vma low, high;
@@ -1051,7 +1051,7 @@ bfd_getl64 (addr)
 
 bfd_signed_vma
 bfd_getb_signed_64 (addr)
 
 bfd_signed_vma
 bfd_getb_signed_64 (addr)
-     register const bfd_byte *addr;
+     register const bfd_byte *addr ATTRIBUTE_UNUSED;
 {
 #ifdef BFD64
   bfd_vma low, high;
 {
 #ifdef BFD64
   bfd_vma low, high;
@@ -1075,7 +1075,7 @@ bfd_getb_signed_64 (addr)
 
 bfd_signed_vma
 bfd_getl_signed_64 (addr)
 
 bfd_signed_vma
 bfd_getl_signed_64 (addr)
-     register const bfd_byte *addr;
+     register const bfd_byte *addr ATTRIBUTE_UNUSED;
 {
 #ifdef BFD64
   bfd_vma low, high;
 {
 #ifdef BFD64
   bfd_vma low, high;
@@ -1120,8 +1120,8 @@ bfd_putl32 (data, addr)
 
 void
 bfd_putb64 (data, addr)
 
 void
 bfd_putb64 (data, addr)
-     bfd_vma data;
-     register bfd_byte *addr;
+     bfd_vma data ATTRIBUTE_UNUSED;
+     register bfd_byte *addr ATTRIBUTE_UNUSED;
 {
 #ifdef BFD64
   addr[0] = (bfd_byte)(data >> (7*8));
 {
 #ifdef BFD64
   addr[0] = (bfd_byte)(data >> (7*8));
@@ -1139,8 +1139,8 @@ bfd_putb64 (data, addr)
 
 void
 bfd_putl64 (data, addr)
 
 void
 bfd_putl64 (data, addr)
-     bfd_vma data;
-     register bfd_byte *addr;
+     bfd_vma data ATTRIBUTE_UNUSED;
+     register bfd_byte *addr ATTRIBUTE_UNUSED;
 {
 #ifdef BFD64
   addr[7] = (bfd_byte)(data >> (7*8));
 {
 #ifdef BFD64
   addr[7] = (bfd_byte)(data >> (7*8));
@@ -1177,11 +1177,11 @@ _bfd_generic_get_section_contents (abfd, section, location, offset, count)
 
 boolean
 _bfd_generic_get_section_contents_in_window (abfd, section, w, offset, count)
 
 boolean
 _bfd_generic_get_section_contents_in_window (abfd, section, w, offset, count)
-     bfd *abfd;
-     sec_ptr section;
-     bfd_window *w;
-     file_ptr offset;
-     bfd_size_type count;
+     bfd *abfd ATTRIBUTE_UNUSED;
+     sec_ptr section ATTRIBUTE_UNUSED;
+     bfd_window *w ATTRIBUTE_UNUSED;
+     file_ptr offset ATTRIBUTE_UNUSED;
+     bfd_size_type count ATTRIBUTE_UNUSED;
 {
 #ifdef USE_MMAP
   if (count == 0)
 {
 #ifdef USE_MMAP
   if (count == 0)
index b1fb6211f83fd42b281eebacff97791c6595824e..edf96fe7efdf68d3f2a0f55aa6f0cd953fe70525 100644 (file)
@@ -1,5 +1,6 @@
 /* linker.c -- BFD linker routines
 /* linker.c -- BFD linker routines
-   Copyright (C) 1993, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1993, 94, 95, 96, 97, 98, 1999
+   Free Software Foundation, Inc.
    Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support
 
 This file is part of BFD, the Binary File Descriptor library.
    Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support
 
 This file is part of BFD, the Binary File Descriptor library.
@@ -1748,8 +1749,8 @@ _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value,
        case MDEF:
          /* Handle a multiple definition.  */
          {
        case MDEF:
          /* Handle a multiple definition.  */
          {
-           asection *msec;
-           bfd_vma mval;
+           asection *msec = NULL;
+           bfd_vma mval = 0;
 
            switch (h->type)
              {
 
            switch (h->type)
              {
@@ -2602,7 +2603,7 @@ _bfd_default_link_order (abfd, info, sec, link_order)
 static boolean
 default_fill_link_order (abfd, info, sec, link_order)
      bfd *abfd;
 static boolean
 default_fill_link_order (abfd, info, sec, link_order)
      bfd *abfd;
-     struct bfd_link_info *info;
+     struct bfd_link_info *info ATTRIBUTE_UNUSED;
      asection *sec;
      struct bfd_link_order *link_order;
 {
      asection *sec;
      struct bfd_link_order *link_order;
 {
@@ -2797,8 +2798,8 @@ DESCRIPTION
 
 boolean
 _bfd_generic_link_split_section (abfd, sec)
 
 boolean
 _bfd_generic_link_split_section (abfd, sec)
-     bfd *abfd;
-     asection *sec;
+     bfd *abfd ATTRIBUTE_UNUSED;
+     asection *sec ATTRIBUTE_UNUSED;
 {
   return false;
 }
 {
   return false;
 }
index 5e1b73a0ba72fabb27a20cddfd11fc1ef16bbd2b..320d49075d4c3f666cb24dc1278f9e8e592ba71c 100644 (file)
@@ -1405,7 +1405,7 @@ _bfd_relocate_contents (howto, input_bfd, relocation, location)
      bfd_byte *location;
 {
   int size;
      bfd_byte *location;
 {
   int size;
-  bfd_vma x;
+  bfd_vma x = 0;
   boolean overflow;
   unsigned int rightshift = howto->rightshift;
   unsigned int bitpos = howto->bitpos;
   boolean overflow;
   unsigned int rightshift = howto->rightshift;
   unsigned int bitpos = howto->bitpos;
@@ -2701,9 +2701,9 @@ DESCRIPTION
 /*ARGSUSED*/
 boolean
 bfd_generic_relax_section (abfd, section, link_info, again)
 /*ARGSUSED*/
 boolean
 bfd_generic_relax_section (abfd, section, link_info, again)
-     bfd *abfd;
-     asection *section;
-     struct bfd_link_info *link_info;
+     bfd *abfd ATTRIBUTE_UNUSED;
+     asection *section ATTRIBUTE_UNUSED;
+     struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
      boolean *again;
 {
   *again = false;
      boolean *again;
 {
   *again = false;
@@ -2726,8 +2726,8 @@ DESCRIPTION
 /*ARGSUSED*/
 boolean
 bfd_generic_gc_sections (abfd, link_info)
 /*ARGSUSED*/
 boolean
 bfd_generic_gc_sections (abfd, link_info)
-     bfd *abfd;
-     struct bfd_link_info *link_info;
+     bfd *abfd ATTRIBUTE_UNUSED;
+     struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
 {
   return true;
 }
 {
   return true;
 }
index 414a9cd912cec57634859c26e159b82dfd9e5b9c..3e0aa2b207907e559d225264f1d19b1109e4e22b 100644 (file)
@@ -1,5 +1,5 @@
 /* Object file "section" support for the BFD library.
 /* Object file "section" support for the BFD library.
-   Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997
+   Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -486,10 +486,14 @@ CODE_FRAGMENT
 static const asymbol global_syms[] =
 {
  /* the_bfd, name, value, attr, section [, udata] */
 static const asymbol global_syms[] =
 {
  /* the_bfd, name, value, attr, section [, udata] */
-  {0, BFD_COM_SECTION_NAME, 0, BSF_SECTION_SYM, (asection *) &bfd_com_section},
-  {0, BFD_UND_SECTION_NAME, 0, BSF_SECTION_SYM, (asection *) &bfd_und_section},
-  {0, BFD_ABS_SECTION_NAME, 0, BSF_SECTION_SYM, (asection *) &bfd_abs_section},
-  {0, BFD_IND_SECTION_NAME, 0, BSF_SECTION_SYM, (asection *) &bfd_ind_section},
+  {0, BFD_COM_SECTION_NAME, 0, BSF_SECTION_SYM,
+   (asection *) &bfd_com_section, { 0 }},
+  {0, BFD_UND_SECTION_NAME, 0, BSF_SECTION_SYM,
+   (asection *) &bfd_und_section, { 0 }},
+  {0, BFD_ABS_SECTION_NAME, 0, BSF_SECTION_SYM,
+   (asection *) &bfd_abs_section, { 0 }},
+  {0, BFD_IND_SECTION_NAME, 0, BSF_SECTION_SYM,
+   (asection *) &bfd_ind_section, { 0 }},
 };
 
 #define STD_SECTION(SEC, FLAGS, SYM, NAME, IDX)        \
 };
 
 #define STD_SECTION(SEC, FLAGS, SYM, NAME, IDX)        \
@@ -737,7 +741,7 @@ DESCRIPTION
 /*ARGSUSED*/
 boolean
 bfd_set_section_flags (abfd, section, flags)
 /*ARGSUSED*/
 boolean
 bfd_set_section_flags (abfd, section, flags)
-     bfd *abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
      sec_ptr section;
      flagword flags;
 {
      sec_ptr section;
      flagword flags;
 {
index 70d2f96175ef14bab1c9a9ef267120697b8fc24c..e77ba407a51e776292459679b83ffbfc399a372e 100644 (file)
@@ -1139,8 +1139,8 @@ symbolsrec_write_object_contents (abfd)
 /*ARGSUSED*/
 static int
 srec_sizeof_headers (abfd, exec)
 /*ARGSUSED*/
 static int
 srec_sizeof_headers (abfd, exec)
-     bfd *abfd;
-     boolean exec;
+     bfd *abfd ATTRIBUTE_UNUSED;
+     boolean exec ATTRIBUTE_UNUSED;
 {
   return 0;
 }
 {
   return 0;
 }
@@ -1209,7 +1209,7 @@ srec_get_symtab (abfd, alocation)
 /*ARGSUSED*/
 static void
 srec_get_symbol_info (ignore_abfd, symbol, ret)
 /*ARGSUSED*/
 static void
 srec_get_symbol_info (ignore_abfd, symbol, ret)
-     bfd *ignore_abfd;
+     bfd *ignore_abfd ATTRIBUTE_UNUSED;
      asymbol *symbol;
      symbol_info *ret;
 {
      asymbol *symbol;
      symbol_info *ret;
 {
@@ -1219,7 +1219,7 @@ srec_get_symbol_info (ignore_abfd, symbol, ret)
 /*ARGSUSED*/
 static void
 srec_print_symbol (ignore_abfd, afile, symbol, how)
 /*ARGSUSED*/
 static void
 srec_print_symbol (ignore_abfd, afile, symbol, how)
-     bfd *ignore_abfd;
+     bfd *ignore_abfd ATTRIBUTE_UNUSED;
      PTR afile;
      asymbol *symbol;
      bfd_print_symbol_type how;
      PTR afile;
      asymbol *symbol;
      bfd_print_symbol_type how;
index ffc000d499ec0aed5551b4ad6289bb1bdb304fbb..ea4da8fccc961f3c55f858553d0f2f8fd6ea1595 100644 (file)
@@ -1,5 +1,5 @@
 /* Stabs in sections linking support.
 /* Stabs in sections linking support.
-   Copyright 1996, 1997, 1998 Free Software Foundation, Inc.
+   Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support.
 
 This file is part of BFD, the Binary File Descriptor library.
    Written by Ian Lance Taylor, Cygnus Support.
 
 This file is part of BFD, the Binary File Descriptor library.
@@ -619,8 +619,8 @@ _bfd_write_stab_strings (output_bfd, psinfo)
 
 bfd_vma
 _bfd_stab_section_offset (output_bfd, psinfo, stabsec, psecinfo, offset)
 
 bfd_vma
 _bfd_stab_section_offset (output_bfd, psinfo, stabsec, psecinfo, offset)
-     bfd *output_bfd;
-     PTR *psinfo;
+     bfd *output_bfd ATTRIBUTE_UNUSED;
+     PTR *psinfo ATTRIBUTE_UNUSED;
      asection *stabsec;
      PTR *psecinfo;
      bfd_vma offset;
      asection *stabsec;
      PTR *psecinfo;
      bfd_vma offset;
index f69d1f21fa489a5bca0717e5ed9828017d8cc3ac..108e3eac27ba7faf338806dbceeebd02526c2c71 100644 (file)
@@ -1,5 +1,5 @@
 /* Generic symbol-table support for the BFD library.
 /* Generic symbol-table support for the BFD library.
-   Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+   Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -698,10 +698,10 @@ _bfd_generic_read_minisymbols (abfd, dynamic, minisymsp, sizep)
 /*ARGSUSED*/
 asymbol *
 _bfd_generic_minisymbol_to_symbol (abfd, dynamic, minisym, sym)
 /*ARGSUSED*/
 asymbol *
 _bfd_generic_minisymbol_to_symbol (abfd, dynamic, minisym, sym)
-     bfd *abfd;
-     boolean dynamic;
+     bfd *abfd ATTRIBUTE_UNUSED;
+     boolean dynamic ATTRIBUTE_UNUSED;
      const PTR minisym;
      const PTR minisym;
-     asymbol *sym;
+     asymbol *sym ATTRIBUTE_UNUSED;
 {
   return *(asymbol **) minisym;
 }
 {
   return *(asymbol **) minisym;
 }
@@ -796,7 +796,8 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
 {
   struct stab_find_info *info;
   bfd_size_type stabsize, strsize;
 {
   struct stab_find_info *info;
   bfd_size_type stabsize, strsize;
-  bfd_byte *stab, *str, *last_stab;
+  bfd_byte *stab, *str;
+  bfd_byte *last_stab = NULL;
   bfd_size_type stroff;
   struct indexentry *indexentry;
   char *directory_name, *file_name;
   bfd_size_type stroff;
   struct indexentry *indexentry;
   char *directory_name, *file_name;
@@ -1032,23 +1033,24 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
                  file_name = NULL;
                  saw_fun = 1;
                }
                  file_name = NULL;
                  saw_fun = 1;
                }
-             else {
-               last_stab = stab;
-               if (stab + STABSIZE >= info->stabs + stabsize
-                   || *(stab + STABSIZE + TYPEOFF) != N_SO)
-                 {
-                   directory_name = NULL;
-                 }
-               else
-                 {
-                   /* Two consecutive N_SOs are a directory and a file
-                      name.  */
-                   stab += STABSIZE;
-                   directory_name = file_name;
-                   file_name = ((char *) str
-                                + bfd_get_32 (abfd, stab + STRDXOFF));
-                 }
-             }
+             else
+               {
+                 last_stab = stab;
+                 if (stab + STABSIZE >= info->stabs + stabsize
+                     || *(stab + STABSIZE + TYPEOFF) != N_SO)
+                   {
+                     directory_name = NULL;
+                   }
+                 else
+                   {
+                     /* Two consecutive N_SOs are a directory and a
+                        file name.  */
+                     stab += STABSIZE;
+                     directory_name = file_name;
+                     file_name = ((char *) str
+                                  + bfd_get_32 (abfd, stab + STRDXOFF));
+                   }
+               }
              break;
 
            case N_SOL:
              break;
 
            case N_SOL:
index c88fe2dbaf235a871292bcb76af73397c2d27043..cd1563ffc8ad8100bc2cd992f50d52dc0ca8a2c2 100644 (file)
@@ -1,5 +1,6 @@
 /* BFD backend for Extended Tektronix Hex Format  objects.
 /* BFD backend for Extended Tektronix Hex Format  objects.
-   Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1992, 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 BFD, the Binary File Descriptor library.
    Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
 
 This file is part of BFD, the Binary File Descriptor library.
@@ -599,7 +600,7 @@ move_section_contents (abfd, section, locationp, offset, count, get)
      bfd *abfd;
      asection *section;
      PTR locationp;
      bfd *abfd;
      asection *section;
      PTR locationp;
-     file_ptr offset;
+     file_ptr offset ATTRIBUTE_UNUSED;
      bfd_size_type count;
      boolean get;
 {
      bfd_size_type count;
      boolean get;
 {
@@ -928,8 +929,8 @@ tekhex_write_object_contents (abfd)
 
 static int
 tekhex_sizeof_headers (abfd, exec)
 
 static int
 tekhex_sizeof_headers (abfd, exec)
-     bfd *abfd;
-     boolean exec;
+     bfd *abfd ATTRIBUTE_UNUSED;
+     boolean exec ATTRIBUTE_UNUSED;
 
 {
   return 0;
 
 {
   return 0;
@@ -951,7 +952,7 @@ tekhex_make_empty_symbol (abfd)
 
 static void
 tekhex_get_symbol_info (ignore_abfd, symbol, ret)
 
 static void
 tekhex_get_symbol_info (ignore_abfd, symbol, ret)
-     bfd *ignore_abfd;
+     bfd *ignore_abfd ATTRIBUTE_UNUSED;
      asymbol *symbol;
      symbol_info *ret;
 {
      asymbol *symbol;
      symbol_info *ret;
 {
@@ -960,7 +961,7 @@ tekhex_get_symbol_info (ignore_abfd, symbol, ret)
 
 static void
 tekhex_print_symbol (ignore_abfd, filep, symbol, how)
 
 static void
 tekhex_print_symbol (ignore_abfd, filep, symbol, how)
-     bfd *ignore_abfd;
+     bfd *ignore_abfd ATTRIBUTE_UNUSED;
      PTR filep;
      asymbol *symbol;
      bfd_print_symbol_type how;
      PTR filep;
      asymbol *symbol;
      bfd_print_symbol_type how;
index 21d920b0e8722e36d512d888a2b2e6625ab28449..253eb7ad06fd191104a4525f6d361adb9b853f1e 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back end for traditional Unix core files (U-area and raw sections)
 /* BFD back end for traditional Unix core files (U-area and raw sections)
-   Copyright 1988, 89, 91, 92, 93, 94, 95, 96, 1998
+   Copyright 1988, 89, 91, 92, 93, 94, 95, 96, 98, 1999
    Free Software Foundation, Inc.
    Written by John Gilmore of Cygnus Support.
 
    Free Software Foundation, Inc.
    Written by John Gilmore of Cygnus Support.
 
@@ -105,22 +105,24 @@ trad_unix_core_file_p (abfd)
        bfd_set_error (bfd_error_system_call);
        return 0;
       }
        bfd_set_error (bfd_error_system_call);
        return 0;
       }
-    if (NBPG * (UPAGES + u.u_dsize
+    if ((unsigned long) (NBPG * (UPAGES + u.u_dsize
 #ifdef TRAD_CORE_DSIZE_INCLUDES_TSIZE
 #ifdef TRAD_CORE_DSIZE_INCLUDES_TSIZE
-               - u.u_tsize
+                                - u.u_tsize
 #endif
 #endif
-               + u.u_ssize) > statbuf.st_size)
+                                + u.u_ssize))
+       > (unsigned long) statbuf.st_size)
       {
        bfd_set_error (bfd_error_file_truncated);
        return 0;
       }
 #ifndef TRAD_CORE_ALLOW_ANY_EXTRA_SIZE
       {
        bfd_set_error (bfd_error_file_truncated);
        return 0;
       }
 #ifndef TRAD_CORE_ALLOW_ANY_EXTRA_SIZE
-    if (NBPG * (UPAGES + u.u_dsize + u.u_ssize)
+    if ((unsigned long) (NBPG * (UPAGES + u.u_dsize + u.u_ssize)
 #ifdef TRAD_CORE_EXTRA_SIZE_ALLOWED
        /* Some systems write the file too big.  */
 #ifdef TRAD_CORE_EXTRA_SIZE_ALLOWED
        /* Some systems write the file too big.  */
-       + TRAD_CORE_EXTRA_SIZE_ALLOWED
+                        + TRAD_CORE_EXTRA_SIZE_ALLOWED
 #endif
 #endif
-       < statbuf.st_size)
+                        )
+       < (unsigned long) statbuf.st_size)
       {
        /* The file is too big.  Maybe it's not a core file
           or we otherwise have bad values for u_dsize and u_ssize).  */
       {
        /* The file is too big.  Maybe it's not a core file
           or we otherwise have bad values for u_dsize and u_ssize).  */
@@ -239,7 +241,7 @@ trad_unix_core_file_failing_command (abfd)
 /* ARGSUSED */
 int
 trad_unix_core_file_failing_signal (ignore_abfd)
 /* ARGSUSED */
 int
 trad_unix_core_file_failing_signal (ignore_abfd)
-     bfd *ignore_abfd;
+     bfd *ignore_abfd ATTRIBUTE_UNUSED;
 {
 #ifdef TRAD_UNIX_CORE_FILE_FAILING_SIGNAL
   return TRAD_UNIX_CORE_FILE_FAILING_SIGNAL(ignore_abfd);
 {
 #ifdef TRAD_UNIX_CORE_FILE_FAILING_SIGNAL
   return TRAD_UNIX_CORE_FILE_FAILING_SIGNAL(ignore_abfd);
@@ -251,7 +253,8 @@ trad_unix_core_file_failing_signal (ignore_abfd)
 /* ARGSUSED */
 boolean
 trad_unix_core_file_matches_executable_p  (core_bfd, exec_bfd)
 /* ARGSUSED */
 boolean
 trad_unix_core_file_matches_executable_p  (core_bfd, exec_bfd)
-     bfd *core_bfd, *exec_bfd;
+     bfd *core_bfd ATTRIBUTE_UNUSED;
+     bfd *exec_bfd ATTRIBUTE_UNUSED;
 {
   return true;         /* FIXME, We have no way of telling at this point */
 }
 {
   return true;         /* FIXME, We have no way of telling at this point */
 }
This page took 0.071441 seconds and 4 git commands to generate.