aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1999-07-11 20:02:30 +0000
committerIan Lance Taylor <ian@airs.com>1999-07-11 20:02:30 +0000
commitb4c96d0d372cd69f536cb481d0c9554cf9f0eda8 (patch)
treef1493951e1d44b983758309afb226a00bb058edc
parent7442e600c8d771f2d03c6df7415bbfcbf99759b6 (diff)
downloadgdb-b4c96d0d372cd69f536cb481d0c9554cf9f0eda8.zip
gdb-b4c96d0d372cd69f536cb481d0c9554cf9f0eda8.tar.gz
gdb-b4c96d0d372cd69f536cb481d0c9554cf9f0eda8.tar.bz2
* Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
as appropriate. Add variable initializations. Add casts. * objdump.c (disassemble_bytes): Change j to bfd_vma. * readelf.c (process_syminfo): Change i to unsigned int. (display_debug_info): Change abbrev_number to unsigned long. (process_mips_specific): Change fcnt to size_t.
-rw-r--r--binutils/ChangeLog9
-rw-r--r--binutils/addr2line.c2
-rw-r--r--binutils/arparse.y2
-rw-r--r--binutils/arsup.c5
-rw-r--r--binutils/debug.c51
-rw-r--r--binutils/filemode.c6
-rw-r--r--binutils/ieee.c34
-rw-r--r--binutils/nm.c6
-rw-r--r--binutils/objcopy.c26
-rw-r--r--binutils/objdump.c16
-rw-r--r--binutils/prdbg.c8
-rw-r--r--binutils/rdcoff.c6
-rw-r--r--binutils/readelf.c34
-rw-r--r--binutils/size.c12
-rw-r--r--binutils/stabs.c8
-rw-r--r--binutils/wrstabs.c6
16 files changed, 123 insertions, 108 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index f7f25a1..f68bfd9 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,12 @@
+1999-07-11 Ian Lance Taylor <ian@zembu.com>
+
+ * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
+ as appropriate. Add variable initializations. Add casts.
+ * objdump.c (disassemble_bytes): Change j to bfd_vma.
+ * readelf.c (process_syminfo): Change i to unsigned int.
+ (display_debug_info): Change abbrev_number to unsigned long.
+ (process_mips_specific): Change fcnt to size_t.
+
1999-07-09 Nick Clifton <nickc@cygnus.com>
* readelf.c: Only support decoding 64bit ELF files if the compiler
diff --git a/binutils/addr2line.c b/binutils/addr2line.c
index 3cee867..72707c2 100644
--- a/binutils/addr2line.c
+++ b/binutils/addr2line.c
@@ -123,7 +123,7 @@ static void
find_address_in_section (abfd, section, data)
bfd *abfd;
asection *section;
- PTR data;
+ PTR data ATTRIBUTE_UNUSED;
{
bfd_vma vma;
bfd_size_type size;
diff --git a/binutils/arparse.y b/binutils/arparse.y
index d6c7600..a5e90fa 100644
--- a/binutils/arparse.y
+++ b/binutils/arparse.y
@@ -193,7 +193,7 @@ verbose_command:
static int
yyerror (x)
- const char *x;
+ const char *x ATTRIBUTE_UNUSED;
{
extern int linenumber;
diff --git a/binutils/arsup.c b/binutils/arsup.c
index 38fd695..d6809fc 100644
--- a/binutils/arsup.c
+++ b/binutils/arsup.c
@@ -1,5 +1,6 @@
/* arsup.c - Archive support for MRI compatibility
- 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 GNU Binutils.
@@ -95,7 +96,7 @@ FILE *outfile;
static void
ar_directory_doer (abfd, ignore)
bfd *abfd;
- bfd *ignore;
+ bfd *ignore ATTRIBUTE_UNUSED;
{
print_arelt_descr(outfile, abfd, verbose);
}
diff --git a/binutils/debug.c b/binutils/debug.c
index 173d627..dad4559 100644
--- a/binutils/debug.c
+++ b/binutils/debug.c
@@ -1,5 +1,5 @@
/* debug.c -- Handle generic debugging information.
- Copyright (C) 1995, 1996, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -603,7 +603,7 @@ debug_error (message)
static struct debug_name *
debug_add_to_namespace (info, nsp, name, kind, linkage)
- struct debug_handle *info;
+ struct debug_handle *info ATTRIBUTE_UNUSED;
struct debug_namespace **nsp;
const char *name;
enum debug_object_kind kind;
@@ -1039,8 +1039,8 @@ debug_record_line (handle, lineno, addr)
boolean
debug_start_common_block (handle, name)
- PTR handle;
- const char *name;
+ PTR handle ATTRIBUTE_UNUSED;
+ const char *name ATTRIBUTE_UNUSED;
{
/* FIXME */
debug_error (_("debug_start_common_block: not implemented"));
@@ -1051,8 +1051,8 @@ debug_start_common_block (handle, name)
boolean
debug_end_common_block (handle, name)
- PTR handle;
- const char *name;
+ PTR handle ATTRIBUTE_UNUSED;
+ const char *name ATTRIBUTE_UNUSED;
{
/* FIXME */
debug_error (_("debug_end_common_block: not implemented"));
@@ -1143,10 +1143,10 @@ debug_record_typed_const (handle, name, type, val)
boolean
debug_record_label (handle, name, type, addr)
- PTR handle;
- const char *name;
- debug_type type;
- bfd_vma addr;
+ PTR handle ATTRIBUTE_UNUSED;
+ const char *name ATTRIBUTE_UNUSED;
+ debug_type type ATTRIBUTE_UNUSED;
+ bfd_vma addr ATTRIBUTE_UNUSED;
{
/* FIXME. */
debug_error (_("debug_record_label not implemented"));
@@ -1219,7 +1219,7 @@ debug_record_variable (handle, name, type, kind, val)
/*ARGSUSED*/
static struct debug_type *
debug_make_type (info, kind, size)
- struct debug_handle *info;
+ struct debug_handle *info ATTRIBUTE_UNUSED;
enum debug_type_kind kind;
unsigned int size;
{
@@ -1781,7 +1781,7 @@ debug_make_undefined_tagged_type (handle, name, kind)
/*ARGSUSED*/
debug_baseclass
debug_make_baseclass (handle, type, bitpos, virtual, visibility)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
debug_type type;
bfd_vma bitpos;
boolean virtual;
@@ -1809,7 +1809,7 @@ debug_make_baseclass (handle, type, bitpos, virtual, visibility)
/*ARGSUSED*/
debug_field
debug_make_field (handle, name, type, bitpos, bitsize, visibility)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
const char *name;
debug_type type;
bfd_vma bitpos;
@@ -1840,7 +1840,7 @@ debug_make_field (handle, name, type, bitpos, bitsize, visibility)
/*ARGSUSED*/
debug_field
debug_make_static_member (handle, name, type, physname, visibility)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
const char *name;
debug_type type;
const char *physname;
@@ -1866,7 +1866,7 @@ debug_make_static_member (handle, name, type, physname, visibility)
/*ARGSUSED*/
debug_method
debug_make_method (handle, name, variants)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
const char *name;
debug_method_variant *variants;
{
@@ -1894,7 +1894,7 @@ debug_make_method (handle, name, variants)
debug_method_variant
debug_make_method_variant (handle, physname, type, visibility, constp,
volatilep, voffset, context)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
const char *physname;
debug_type type;
enum debug_visibility visibility;
@@ -1926,7 +1926,7 @@ debug_make_method_variant (handle, physname, type, visibility, constp,
debug_method_variant
debug_make_static_method_variant (handle, physname, type, visibility,
constp, volatilep)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
const char *physname;
debug_type type;
enum debug_visibility visibility;
@@ -2058,7 +2058,7 @@ debug_tag_type (handle, name, type)
/*ARGSUSED*/
boolean
debug_record_type_size (handle, type, size)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
debug_type type;
unsigned int size;
{
@@ -2394,7 +2394,7 @@ debug_get_fields (handle, type)
/*ARGSUSED*/
debug_type
debug_get_field_type (handle, field)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
debug_field field;
{
if (field == NULL)
@@ -2407,7 +2407,7 @@ debug_get_field_type (handle, field)
/*ARGSUSED*/
const char *
debug_get_field_name (handle, field)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
debug_field field;
{
if (field == NULL)
@@ -2420,7 +2420,7 @@ debug_get_field_name (handle, field)
/*ARGSUSED*/
bfd_vma
debug_get_field_bitpos (handle, field)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
debug_field field;
{
if (field == NULL || field->static_member)
@@ -2433,7 +2433,7 @@ debug_get_field_bitpos (handle, field)
/*ARGSUSED*/
bfd_vma
debug_get_field_bitsize (handle, field)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
debug_field field;
{
if (field == NULL || field->static_member)
@@ -2446,7 +2446,7 @@ debug_get_field_bitsize (handle, field)
/*ARGSUSED*/
enum debug_visibility
debug_get_field_visibility (handle, field)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
debug_field field;
{
if (field == NULL)
@@ -2458,7 +2458,7 @@ debug_get_field_visibility (handle, field)
const char *
debug_get_field_physname (handle, field)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
debug_field field;
{
if (field == NULL || ! field->static_member)
@@ -2598,7 +2598,7 @@ debug_write_type (info, fns, fhandle, type, name)
{
unsigned int i;
int is;
- const char *tag;
+ const char *tag = NULL;
/* If we have a name for this type, just output it. We only output
typedef names after they have been defined. We output type tags
@@ -2648,7 +2648,6 @@ debug_write_type (info, fns, fhandle, type, name)
if (name != NULL)
name->mark = info->mark;
- tag = NULL;
if (name != NULL
&& type->kind != DEBUG_KIND_NAMED
&& type->kind != DEBUG_KIND_TAGGED)
diff --git a/binutils/filemode.c b/binutils/filemode.c
index 58b52ba..f9811bc 100644
--- a/binutils/filemode.c
+++ b/binutils/filemode.c
@@ -1,5 +1,5 @@
/* filemode.c -- make a string describing file modes
- Copyright (C) 1985, 90, 91, 94, 95, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1985, 90, 91, 94, 95, 97, 1999 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -230,8 +230,8 @@ ftypelet (bits)
static void
setst (bits, chars)
- unsigned long bits;
- char *chars;
+ unsigned long bits ATTRIBUTE_UNUSED;
+ char *chars ATTRIBUTE_UNUSED;
{
#ifdef S_ISUID
if (bits & S_ISUID)
diff --git a/binutils/ieee.c b/binutils/ieee.c
index 17a5b88..c036928 100644
--- a/binutils/ieee.c
+++ b/binutils/ieee.c
@@ -1,5 +1,5 @@
/* ieee.c -- Read and write IEEE-695 debugging information.
- Copyright (C) 1996, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1998, 1999 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -4104,7 +4104,7 @@ static const struct debug_write_fns ieee_fns =
/*ARGSUSED*/
static boolean
ieee_init_buffer (info, buflist)
- struct ieee_handle *info;
+ struct ieee_handle *info ATTRIBUTE_UNUSED;
struct ieee_buflist *buflist;
{
buflist->head = NULL;
@@ -4145,7 +4145,7 @@ ieee_change_buffer (info, buflist)
/*ARGSUSED*/
static boolean
ieee_append_buffer (info, mainbuf, newbuf)
- struct ieee_handle *info;
+ struct ieee_handle *info ATTRIBUTE_UNUSED;
struct ieee_buflist *mainbuf;
struct ieee_buflist *newbuf;
{
@@ -5135,7 +5135,7 @@ ieee_finish_compilation_unit (info)
static void
ieee_add_bb11_blocks (abfd, sec, data)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
asection *sec;
PTR data;
{
@@ -5258,8 +5258,8 @@ ieee_add_bb11 (info, sec, low, high)
/*ARGSUSED*/
static boolean
ieee_start_source (p, filename)
- PTR p;
- const char *filename;
+ PTR p ATTRIBUTE_UNUSED;
+ const char *filename ATTRIBUTE_UNUSED;
{
return true;
}
@@ -5725,7 +5725,7 @@ ieee_array_type (p, low, high, stringp)
PTR p;
bfd_signed_vma low;
bfd_signed_vma high;
- boolean stringp;
+ boolean stringp ATTRIBUTE_UNUSED;
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int eleindx;
@@ -5792,7 +5792,7 @@ ieee_array_type (p, low, high, stringp)
static boolean
ieee_set_type (p, bitstringp)
PTR p;
- boolean bitstringp;
+ boolean bitstringp ATTRIBUTE_UNUSED;
{
struct ieee_handle *info = (struct ieee_handle *) p;
boolean localp;
@@ -7012,7 +7012,7 @@ ieee_typdef (p, name)
static boolean
ieee_tag (p, name)
PTR p;
- const char *name;
+ const char *name ATTRIBUTE_UNUSED;
{
struct ieee_handle *info = (struct ieee_handle *) p;
@@ -7026,9 +7026,9 @@ ieee_tag (p, name)
static boolean
ieee_int_constant (p, name, val)
- PTR p;
- const char *name;
- bfd_vma val;
+ PTR p ATTRIBUTE_UNUSED;
+ const char *name ATTRIBUTE_UNUSED;
+ bfd_vma val ATTRIBUTE_UNUSED;
{
/* FIXME. */
return true;
@@ -7038,9 +7038,9 @@ ieee_int_constant (p, name, val)
static boolean
ieee_float_constant (p, name, val)
- PTR p;
- const char *name;
- double val;
+ PTR p ATTRIBUTE_UNUSED;
+ const char *name ATTRIBUTE_UNUSED;
+ double val ATTRIBUTE_UNUSED;
{
/* FIXME. */
return true;
@@ -7051,8 +7051,8 @@ ieee_float_constant (p, name, val)
static boolean
ieee_typed_constant (p, name, val)
PTR p;
- const char *name;
- bfd_vma val;
+ const char *name ATTRIBUTE_UNUSED;
+ bfd_vma val ATTRIBUTE_UNUSED;
{
struct ieee_handle *info = (struct ieee_handle *) p;
diff --git a/binutils/nm.c b/binutils/nm.c
index c51b7fb..884f0b8 100644
--- a/binutils/nm.c
+++ b/binutils/nm.c
@@ -1305,13 +1305,13 @@ print_archive_filename_bsd (filename)
static void
print_archive_filename_sysv (filename)
- char *filename;
+ char *filename ATTRIBUTE_UNUSED;
{
}
static void
print_archive_filename_posix (filename)
- char *filename;
+ char *filename ATTRIBUTE_UNUSED;
{
}
@@ -1319,7 +1319,7 @@ print_archive_filename_posix (filename)
static void
print_archive_member_bsd (archive, filename)
- char *archive;
+ char *archive ATTRIBUTE_UNUSED;
CONST char *filename;
{
if (!filename_per_symbol)
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index 53bd996..6137f11 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -467,7 +467,7 @@ is_specified_symbol (name, list)
static boolean
is_strip_section (abfd, sec)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
asection *sec;
{
struct section_list *p;
@@ -605,7 +605,7 @@ filter_bytes (memhunk, size)
for (; from < end; from += interleave)
*to++ = *from;
- if (*size % interleave > copy_byte)
+ if (*size % interleave > (bfd_size_type) copy_byte)
*size = (*size / interleave) + 1;
else
*size /= interleave;
@@ -1360,7 +1360,7 @@ copy_section (ibfd, isection, obfdarg)
static void
get_sections (obfd, osection, secppparg)
- bfd *obfd;
+ bfd *obfd ATTRIBUTE_UNUSED;
asection *osection;
PTR secppparg;
{
@@ -1467,8 +1467,8 @@ static boolean
write_debugging_info (obfd, dhandle, symcountp, symppp)
bfd *obfd;
PTR dhandle;
- long *symcountp;
- asymbol ***symppp;
+ long *symcountp ATTRIBUTE_UNUSED;
+ asymbol ***symppp ATTRIBUTE_UNUSED;
{
if (bfd_get_flavour (obfd) == bfd_target_ieee_flavour)
return write_ieee_debugging_info (obfd, dhandle);
@@ -1807,15 +1807,21 @@ copy_main (argc, argv)
const char *s;
int len;
char *name;
- char *option;
+ char *option = NULL;
bfd_vma val;
- enum change_action what;
+ enum change_action what = CHANGE_IGNORE;
switch (c)
{
- case OPTION_CHANGE_SECTION_ADDRESS: option = "--change-section-address"; break;
- case OPTION_CHANGE_SECTION_LMA: option = "--change-section-lma"; break;
- case OPTION_CHANGE_SECTION_VMA: option = "--change-section-vma"; break;
+ case OPTION_CHANGE_SECTION_ADDRESS:
+ option = "--change-section-address";
+ break;
+ case OPTION_CHANGE_SECTION_LMA:
+ option = "--change-section-lma";
+ break;
+ case OPTION_CHANGE_SECTION_VMA:
+ option = "--change-section-vma";
+ break;
}
s = strchr (optarg, '=');
diff --git a/binutils/objdump.c b/binutils/objdump.c
index b7ee5d6..1cd5fb6 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -289,9 +289,9 @@ static struct option long_options[]=
static void
dump_section_header (abfd, section, ignored)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
asection *section;
- PTR ignored;
+ PTR ignored ATTRIBUTE_UNUSED;
{
char *comma = "";
@@ -1139,7 +1139,7 @@ objdump_sprintf (va_alist)
n = strlen (buf);
- while ((f->buffer + f->size) - f->current < n + 1)
+ while ((size_t) ((f->buffer + f->size) - f->current) < n + 1)
{
size_t curroff;
@@ -1319,7 +1319,7 @@ disassemble_bytes (info, disassemble_fn, insns, data, start, stop, relppp,
}
else
{
- long j;
+ bfd_vma j;
bytes = bytes_per_line;
if (i + bytes > stop)
@@ -1339,7 +1339,7 @@ disassemble_bytes (info, disassemble_fn, insns, data, start, stop, relppp,
? show_raw_insn > 0
: show_raw_insn >= 0)
{
- long j;
+ bfd_vma j;
/* If ! prefix_addresses and ! wide_output, we print
bytes_per_line bytes per line. */
@@ -1399,7 +1399,7 @@ disassemble_bytes (info, disassemble_fn, insns, data, start, stop, relppp,
{
while (pb < bytes)
{
- long j;
+ bfd_vma j;
char *s;
putchar ('\n');
@@ -1871,7 +1871,7 @@ static void
print_section_stabs (abfd, stabsect_name, strsect_name)
bfd *abfd;
const char *stabsect_name;
- const char *strsect_name;
+ const char *strsect_name ATTRIBUTE_UNUSED;
{
int i;
unsigned file_string_table_offset = 0, next_file_string_table_offset = 0;
@@ -2227,7 +2227,7 @@ dump_data (abfd)
/* Should perhaps share code and display with nm? */
static void
dump_symbols (abfd, dynamic)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
boolean dynamic;
{
asymbol **current;
diff --git a/binutils/prdbg.c b/binutils/prdbg.c
index 958cbd2..abd684d 100644
--- a/binutils/prdbg.c
+++ b/binutils/prdbg.c
@@ -1,5 +1,5 @@
/* prdbg.c -- Print out generic debugging information.
- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -985,7 +985,7 @@ pr_fix_visibility (info, visibility)
struct pr_handle *info;
enum debug_visibility visibility;
{
- const char *s;
+ const char *s = NULL;
char *t;
unsigned int len;
@@ -1602,7 +1602,7 @@ pr_typdef (p, name)
static boolean
pr_tag (p, name)
PTR p;
- const char *name;
+ const char *name ATTRIBUTE_UNUSED;
{
struct pr_handle *info = (struct pr_handle *) p;
char *t;
@@ -1856,7 +1856,7 @@ pr_end_block (p, addr)
/*ARGSUSED*/
static boolean
pr_end_function (p)
- PTR p;
+ PTR p ATTRIBUTE_UNUSED;
{
return true;
}
diff --git a/binutils/rdcoff.c b/binutils/rdcoff.c
index ee68bc6..d1ee6e6 100644
--- a/binutils/rdcoff.c
+++ b/binutils/rdcoff.c
@@ -1,5 +1,5 @@
/* stabs.c -- Parse COFF debugging information
- Copyright (C) 1996, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1998, 1999 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -498,7 +498,7 @@ static debug_type
parse_coff_enum_type (abfd, symbols, types, pauxent, dhandle)
bfd *abfd;
struct coff_symbols *symbols;
- struct coff_types *types;
+ struct coff_types *types ATTRIBUTE_UNUSED;
union internal_auxent *pauxent;
PTR dhandle;
{
@@ -569,7 +569,7 @@ parse_coff_enum_type (abfd, symbols, types, pauxent, dhandle)
static boolean
parse_coff_symbol (abfd, types, sym, coff_symno, psyment, dhandle, type,
within_function)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
struct coff_types *types;
asymbol *sym;
long coff_symno;
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 3c613a6..4b7dc0a 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -1880,7 +1880,7 @@ process_program_headers (file)
? (section->sh_addr >= segment->p_vaddr
&& section->sh_addr + section->sh_size
<= segment->p_vaddr + segment->p_memsz)
- : (section->sh_offset >= segment->p_offset
+ : ((bfd_vma) section->sh_offset >= segment->p_offset
&& (section->sh_offset + section->sh_size
<= segment->p_offset + segment->p_filesz))))
printf ("%s ", SECTION_NAME (section));
@@ -2205,7 +2205,7 @@ process_relocs (file)
if (do_using_dynamic)
{
- int is_rela;
+ int is_rela = FALSE;
rel_size = 0;
rel_offset = 0;
@@ -3549,7 +3549,7 @@ process_symbol_table (file)
Elf32_Internal_Shdr * section;
char nb [4];
char nc [4];
- int nbuckets;
+ int nbuckets = 0;
int nchains;
int * buckets = NULL;
int * chains = NULL;
@@ -3884,9 +3884,9 @@ process_symbol_table (file)
static int
process_syminfo (file)
- FILE * file;
+ FILE * file ATTRIBUTE_UNUSED;
{
- int i;
+ unsigned int i;
if (dynamic_syminfo == NULL
|| !do_dynamic)
@@ -4179,7 +4179,7 @@ static int
display_debug_lines (section, start, file)
Elf32_Internal_Shdr * section;
unsigned char * start;
- FILE * file;
+ FILE * file ATTRIBUTE_UNUSED;
{
DWARF2_External_LineInfo * external;
DWARF2_Internal_LineInfo info;
@@ -4399,7 +4399,7 @@ static int
display_debug_pubnames (section, start, file)
Elf32_Internal_Shdr * section;
unsigned char * start;
- FILE * file;
+ FILE * file ATTRIBUTE_UNUSED;
{
DWARF2_External_PubNames * external;
DWARF2_Internal_PubNames pubnames;
@@ -4821,7 +4821,7 @@ static int
display_debug_abbrev (section, start, file)
Elf32_Internal_Shdr * section;
unsigned char * start;
- FILE * file;
+ FILE * file ATTRIBUTE_UNUSED;
{
abbrev_entry * entry;
unsigned char * end = start + section->sh_size;
@@ -5343,8 +5343,8 @@ read_and_display_attr (attribute, form, data, pointer_size)
unsigned char * data;
unsigned long pointer_size;
{
- unsigned long uvalue;
- unsigned char * block_start;
+ unsigned long uvalue = 0;
+ unsigned char * block_start = NULL;
int bytes_read;
int is_ref = 0;
@@ -5665,7 +5665,7 @@ display_debug_info (section, start, file)
while (tags < start)
{
int bytes_read;
- int abbrev_number;
+ unsigned long abbrev_number;
abbrev_entry * entry;
abbrev_attr * attr;
@@ -5688,12 +5688,12 @@ display_debug_info (section, start, file)
if (entry == NULL)
{
- warn (_("Unable to locate entry %d in the abbreviation table\n"),
+ warn (_("Unable to locate entry %lu in the abbreviation table\n"),
abbrev_number);
return 0;
}
- printf (_(" <%d><%x>: Abbrev Number: %d (%s)\n"),
+ printf (_(" <%d><%x>: Abbrev Number: %lu (%s)\n"),
level, tags - section_begin - bytes_read,
abbrev_number,
get_TAG_name (entry->tag));
@@ -5718,7 +5718,7 @@ static int
display_debug_aranges (section, start, file)
Elf32_Internal_Shdr * section;
unsigned char * start;
- FILE * file;
+ FILE * file ATTRIBUTE_UNUSED;
{
unsigned char * end = start + section->sh_size;
@@ -5778,8 +5778,8 @@ display_debug_aranges (section, start, file)
static int
display_debug_not_supported (section, start, file)
Elf32_Internal_Shdr * section;
- unsigned char * start;
- FILE * file;
+ unsigned char * start ATTRIBUTE_UNUSED;
+ FILE * file ATTRIBUTE_UNUSED;
{
printf (_("Displaying the debug contents of section %s is not yet supported.\n"),
SECTION_NAME (section));
@@ -5991,7 +5991,7 @@ process_mips_specific (file)
{ " DELTA", LL_DELTA }
};
int flags = liblist.l_flags;
- int fcnt;
+ size_t fcnt;
for (fcnt = 0;
fcnt < sizeof (l_flags_vals) / sizeof (l_flags_vals[0]);
diff --git a/binutils/size.c b/binutils/size.c
index f57c7ed..c93850c 100644
--- a/binutils/size.c
+++ b/binutils/size.c
@@ -366,9 +366,9 @@ static bfd_size_type textsize;
static void
berkeley_sum (abfd, sec, ignore)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
sec_ptr sec;
- PTR ignore;
+ PTR ignore ATTRIBUTE_UNUSED;
{
flagword flags;
bfd_size_type size;
@@ -433,9 +433,9 @@ int svi_sizelen = 0;
static void
sysv_internal_sizer (file, sec, ignore)
- bfd *file;
+ bfd *file ATTRIBUTE_UNUSED;
sec_ptr sec;
- PTR ignore;
+ PTR ignore ATTRIBUTE_UNUSED;
{
bfd_size_type size = bfd_section_size (file, sec);
if (!bfd_is_abs_section (sec)
@@ -454,9 +454,9 @@ sysv_internal_sizer (file, sec, ignore)
static void
sysv_internal_printer (file, sec, ignore)
- bfd *file;
+ bfd *file ATTRIBUTE_UNUSED;
sec_ptr sec;
- PTR ignore;
+ PTR ignore ATTRIBUTE_UNUSED;
{
bfd_size_type size = bfd_section_size (file, sec);
if (!bfd_is_abs_section (sec)
diff --git a/binutils/stabs.c b/binutils/stabs.c
index 945f876..53e1070 100644
--- a/binutils/stabs.c
+++ b/binutils/stabs.c
@@ -375,7 +375,7 @@ warn_stab (p, err)
/*ARGSUSED*/
PTR
start_stab (dhandle, abfd, sections, syms, symcount)
- PTR dhandle;
+ PTR dhandle ATTRIBUTE_UNUSED;
bfd *abfd;
boolean sections;
asymbol **syms;
@@ -1818,7 +1818,7 @@ parse_stab_range_type (dhandle, info, typename, pp, typenums)
return debug_make_int_type (dhandle, 1, true);
else if (n3 == 0xffff)
return debug_make_int_type (dhandle, 2, true);
- else if (n3 == 0xffffffff)
+ else if (n3 == (bfd_signed_vma) 0xffffffff)
return debug_make_int_type (dhandle, 4, true);
#ifdef BFD64
else if (n3 == ((((bfd_vma) 0xffffffff) << 32) | 0xffffffff))
@@ -3439,7 +3439,7 @@ stab_find_type (dhandle, info, typenums)
static boolean
stab_record_type (dhandle, info, typenums, type)
- PTR dhandle;
+ PTR dhandle ATTRIBUTE_UNUSED;
struct stab_handle *info;
const int *typenums;
debug_type type;
@@ -4513,7 +4513,7 @@ stab_demangle_template (minfo, pp, pname)
static boolean
stab_demangle_class (minfo, pp, pstart)
- struct stab_demangle_info *minfo;
+ struct stab_demangle_info *minfo ATTRIBUTE_UNUSED;
const char **pp;
const char **pstart;
{
diff --git a/binutils/wrstabs.c b/binutils/wrstabs.c
index e428174..8b51587 100644
--- a/binutils/wrstabs.c
+++ b/binutils/wrstabs.c
@@ -1,5 +1,5 @@
/* wrstabs.c -- Output stabs debugging information
- 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 GNU Binutils.
@@ -984,7 +984,7 @@ static boolean
stab_function_type (p, argcount, varargs)
PTR p;
int argcount;
- boolean varargs;
+ boolean varargs ATTRIBUTE_UNUSED;
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
int i;
@@ -2383,7 +2383,7 @@ stab_end_block (p, addr)
/*ARGSUSED*/
static boolean
stab_end_function (p)
- PTR p;
+ PTR p ATTRIBUTE_UNUSED;
{
return true;
}