* 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.
This commit is contained in:
Ian Lance Taylor 1999-07-11 20:02:30 +00:00
parent 7442e600c8
commit b4c96d0d37
16 changed files with 123 additions and 108 deletions

View file

@ -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> 1999-07-09 Nick Clifton <nickc@cygnus.com>
* readelf.c: Only support decoding 64bit ELF files if the compiler * readelf.c: Only support decoding 64bit ELF files if the compiler

View file

@ -123,7 +123,7 @@ static void
find_address_in_section (abfd, section, data) find_address_in_section (abfd, section, data)
bfd *abfd; bfd *abfd;
asection *section; asection *section;
PTR data; PTR data ATTRIBUTE_UNUSED;
{ {
bfd_vma vma; bfd_vma vma;
bfd_size_type size; bfd_size_type size;

View file

@ -193,7 +193,7 @@ verbose_command:
static int static int
yyerror (x) yyerror (x)
const char *x; const char *x ATTRIBUTE_UNUSED;
{ {
extern int linenumber; extern int linenumber;

View file

@ -1,5 +1,6 @@
/* arsup.c - Archive support for MRI compatibility /* 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. This file is part of GNU Binutils.
@ -95,7 +96,7 @@ FILE *outfile;
static void static void
ar_directory_doer (abfd, ignore) ar_directory_doer (abfd, ignore)
bfd *abfd; bfd *abfd;
bfd *ignore; bfd *ignore ATTRIBUTE_UNUSED;
{ {
print_arelt_descr(outfile, abfd, verbose); print_arelt_descr(outfile, abfd, verbose);
} }

View file

@ -1,5 +1,5 @@
/* debug.c -- Handle generic debugging information. /* 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>. Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils. This file is part of GNU Binutils.
@ -603,7 +603,7 @@ debug_error (message)
static struct debug_name * static struct debug_name *
debug_add_to_namespace (info, nsp, name, kind, linkage) debug_add_to_namespace (info, nsp, name, kind, linkage)
struct debug_handle *info; struct debug_handle *info ATTRIBUTE_UNUSED;
struct debug_namespace **nsp; struct debug_namespace **nsp;
const char *name; const char *name;
enum debug_object_kind kind; enum debug_object_kind kind;
@ -1039,8 +1039,8 @@ debug_record_line (handle, lineno, addr)
boolean boolean
debug_start_common_block (handle, name) debug_start_common_block (handle, name)
PTR handle; PTR handle ATTRIBUTE_UNUSED;
const char *name; const char *name ATTRIBUTE_UNUSED;
{ {
/* FIXME */ /* FIXME */
debug_error (_("debug_start_common_block: not implemented")); debug_error (_("debug_start_common_block: not implemented"));
@ -1051,8 +1051,8 @@ debug_start_common_block (handle, name)
boolean boolean
debug_end_common_block (handle, name) debug_end_common_block (handle, name)
PTR handle; PTR handle ATTRIBUTE_UNUSED;
const char *name; const char *name ATTRIBUTE_UNUSED;
{ {
/* FIXME */ /* FIXME */
debug_error (_("debug_end_common_block: not implemented")); debug_error (_("debug_end_common_block: not implemented"));
@ -1143,10 +1143,10 @@ debug_record_typed_const (handle, name, type, val)
boolean boolean
debug_record_label (handle, name, type, addr) debug_record_label (handle, name, type, addr)
PTR handle; PTR handle ATTRIBUTE_UNUSED;
const char *name; const char *name ATTRIBUTE_UNUSED;
debug_type type; debug_type type ATTRIBUTE_UNUSED;
bfd_vma addr; bfd_vma addr ATTRIBUTE_UNUSED;
{ {
/* FIXME. */ /* FIXME. */
debug_error (_("debug_record_label not implemented")); debug_error (_("debug_record_label not implemented"));
@ -1219,7 +1219,7 @@ debug_record_variable (handle, name, type, kind, val)
/*ARGSUSED*/ /*ARGSUSED*/
static struct debug_type * static struct debug_type *
debug_make_type (info, kind, size) debug_make_type (info, kind, size)
struct debug_handle *info; struct debug_handle *info ATTRIBUTE_UNUSED;
enum debug_type_kind kind; enum debug_type_kind kind;
unsigned int size; unsigned int size;
{ {
@ -1781,7 +1781,7 @@ debug_make_undefined_tagged_type (handle, name, kind)
/*ARGSUSED*/ /*ARGSUSED*/
debug_baseclass debug_baseclass
debug_make_baseclass (handle, type, bitpos, virtual, visibility) debug_make_baseclass (handle, type, bitpos, virtual, visibility)
PTR handle; PTR handle ATTRIBUTE_UNUSED;
debug_type type; debug_type type;
bfd_vma bitpos; bfd_vma bitpos;
boolean virtual; boolean virtual;
@ -1809,7 +1809,7 @@ debug_make_baseclass (handle, type, bitpos, virtual, visibility)
/*ARGSUSED*/ /*ARGSUSED*/
debug_field debug_field
debug_make_field (handle, name, type, bitpos, bitsize, visibility) debug_make_field (handle, name, type, bitpos, bitsize, visibility)
PTR handle; PTR handle ATTRIBUTE_UNUSED;
const char *name; const char *name;
debug_type type; debug_type type;
bfd_vma bitpos; bfd_vma bitpos;
@ -1840,7 +1840,7 @@ debug_make_field (handle, name, type, bitpos, bitsize, visibility)
/*ARGSUSED*/ /*ARGSUSED*/
debug_field debug_field
debug_make_static_member (handle, name, type, physname, visibility) debug_make_static_member (handle, name, type, physname, visibility)
PTR handle; PTR handle ATTRIBUTE_UNUSED;
const char *name; const char *name;
debug_type type; debug_type type;
const char *physname; const char *physname;
@ -1866,7 +1866,7 @@ debug_make_static_member (handle, name, type, physname, visibility)
/*ARGSUSED*/ /*ARGSUSED*/
debug_method debug_method
debug_make_method (handle, name, variants) debug_make_method (handle, name, variants)
PTR handle; PTR handle ATTRIBUTE_UNUSED;
const char *name; const char *name;
debug_method_variant *variants; debug_method_variant *variants;
{ {
@ -1894,7 +1894,7 @@ debug_make_method (handle, name, variants)
debug_method_variant debug_method_variant
debug_make_method_variant (handle, physname, type, visibility, constp, debug_make_method_variant (handle, physname, type, visibility, constp,
volatilep, voffset, context) volatilep, voffset, context)
PTR handle; PTR handle ATTRIBUTE_UNUSED;
const char *physname; const char *physname;
debug_type type; debug_type type;
enum debug_visibility visibility; enum debug_visibility visibility;
@ -1926,7 +1926,7 @@ debug_make_method_variant (handle, physname, type, visibility, constp,
debug_method_variant debug_method_variant
debug_make_static_method_variant (handle, physname, type, visibility, debug_make_static_method_variant (handle, physname, type, visibility,
constp, volatilep) constp, volatilep)
PTR handle; PTR handle ATTRIBUTE_UNUSED;
const char *physname; const char *physname;
debug_type type; debug_type type;
enum debug_visibility visibility; enum debug_visibility visibility;
@ -2058,7 +2058,7 @@ debug_tag_type (handle, name, type)
/*ARGSUSED*/ /*ARGSUSED*/
boolean boolean
debug_record_type_size (handle, type, size) debug_record_type_size (handle, type, size)
PTR handle; PTR handle ATTRIBUTE_UNUSED;
debug_type type; debug_type type;
unsigned int size; unsigned int size;
{ {
@ -2394,7 +2394,7 @@ debug_get_fields (handle, type)
/*ARGSUSED*/ /*ARGSUSED*/
debug_type debug_type
debug_get_field_type (handle, field) debug_get_field_type (handle, field)
PTR handle; PTR handle ATTRIBUTE_UNUSED;
debug_field field; debug_field field;
{ {
if (field == NULL) if (field == NULL)
@ -2407,7 +2407,7 @@ debug_get_field_type (handle, field)
/*ARGSUSED*/ /*ARGSUSED*/
const char * const char *
debug_get_field_name (handle, field) debug_get_field_name (handle, field)
PTR handle; PTR handle ATTRIBUTE_UNUSED;
debug_field field; debug_field field;
{ {
if (field == NULL) if (field == NULL)
@ -2420,7 +2420,7 @@ debug_get_field_name (handle, field)
/*ARGSUSED*/ /*ARGSUSED*/
bfd_vma bfd_vma
debug_get_field_bitpos (handle, field) debug_get_field_bitpos (handle, field)
PTR handle; PTR handle ATTRIBUTE_UNUSED;
debug_field field; debug_field field;
{ {
if (field == NULL || field->static_member) if (field == NULL || field->static_member)
@ -2433,7 +2433,7 @@ debug_get_field_bitpos (handle, field)
/*ARGSUSED*/ /*ARGSUSED*/
bfd_vma bfd_vma
debug_get_field_bitsize (handle, field) debug_get_field_bitsize (handle, field)
PTR handle; PTR handle ATTRIBUTE_UNUSED;
debug_field field; debug_field field;
{ {
if (field == NULL || field->static_member) if (field == NULL || field->static_member)
@ -2446,7 +2446,7 @@ debug_get_field_bitsize (handle, field)
/*ARGSUSED*/ /*ARGSUSED*/
enum debug_visibility enum debug_visibility
debug_get_field_visibility (handle, field) debug_get_field_visibility (handle, field)
PTR handle; PTR handle ATTRIBUTE_UNUSED;
debug_field field; debug_field field;
{ {
if (field == NULL) if (field == NULL)
@ -2458,7 +2458,7 @@ debug_get_field_visibility (handle, field)
const char * const char *
debug_get_field_physname (handle, field) debug_get_field_physname (handle, field)
PTR handle; PTR handle ATTRIBUTE_UNUSED;
debug_field field; debug_field field;
{ {
if (field == NULL || ! field->static_member) if (field == NULL || ! field->static_member)
@ -2598,7 +2598,7 @@ debug_write_type (info, fns, fhandle, type, name)
{ {
unsigned int i; unsigned int i;
int is; int is;
const char *tag; const char *tag = NULL;
/* If we have a name for this type, just output it. We only output /* 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 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) if (name != NULL)
name->mark = info->mark; name->mark = info->mark;
tag = NULL;
if (name != NULL if (name != NULL
&& type->kind != DEBUG_KIND_NAMED && type->kind != DEBUG_KIND_NAMED
&& type->kind != DEBUG_KIND_TAGGED) && type->kind != DEBUG_KIND_TAGGED)

View file

@ -1,5 +1,5 @@
/* filemode.c -- make a string describing file modes /* 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 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 it under the terms of the GNU General Public License as published by
@ -230,8 +230,8 @@ ftypelet (bits)
static void static void
setst (bits, chars) setst (bits, chars)
unsigned long bits; unsigned long bits ATTRIBUTE_UNUSED;
char *chars; char *chars ATTRIBUTE_UNUSED;
{ {
#ifdef S_ISUID #ifdef S_ISUID
if (bits & S_ISUID) if (bits & S_ISUID)

View file

@ -1,5 +1,5 @@
/* ieee.c -- Read and write IEEE-695 debugging information. /* 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>. Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils. This file is part of GNU Binutils.
@ -4104,7 +4104,7 @@ static const struct debug_write_fns ieee_fns =
/*ARGSUSED*/ /*ARGSUSED*/
static boolean static boolean
ieee_init_buffer (info, buflist) ieee_init_buffer (info, buflist)
struct ieee_handle *info; struct ieee_handle *info ATTRIBUTE_UNUSED;
struct ieee_buflist *buflist; struct ieee_buflist *buflist;
{ {
buflist->head = NULL; buflist->head = NULL;
@ -4145,7 +4145,7 @@ ieee_change_buffer (info, buflist)
/*ARGSUSED*/ /*ARGSUSED*/
static boolean static boolean
ieee_append_buffer (info, mainbuf, newbuf) ieee_append_buffer (info, mainbuf, newbuf)
struct ieee_handle *info; struct ieee_handle *info ATTRIBUTE_UNUSED;
struct ieee_buflist *mainbuf; struct ieee_buflist *mainbuf;
struct ieee_buflist *newbuf; struct ieee_buflist *newbuf;
{ {
@ -5135,7 +5135,7 @@ ieee_finish_compilation_unit (info)
static void static void
ieee_add_bb11_blocks (abfd, sec, data) ieee_add_bb11_blocks (abfd, sec, data)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
asection *sec; asection *sec;
PTR data; PTR data;
{ {
@ -5258,8 +5258,8 @@ ieee_add_bb11 (info, sec, low, high)
/*ARGSUSED*/ /*ARGSUSED*/
static boolean static boolean
ieee_start_source (p, filename) ieee_start_source (p, filename)
PTR p; PTR p ATTRIBUTE_UNUSED;
const char *filename; const char *filename ATTRIBUTE_UNUSED;
{ {
return true; return true;
} }
@ -5725,7 +5725,7 @@ ieee_array_type (p, low, high, stringp)
PTR p; PTR p;
bfd_signed_vma low; bfd_signed_vma low;
bfd_signed_vma high; bfd_signed_vma high;
boolean stringp; boolean stringp ATTRIBUTE_UNUSED;
{ {
struct ieee_handle *info = (struct ieee_handle *) p; struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int eleindx; unsigned int eleindx;
@ -5792,7 +5792,7 @@ ieee_array_type (p, low, high, stringp)
static boolean static boolean
ieee_set_type (p, bitstringp) ieee_set_type (p, bitstringp)
PTR p; PTR p;
boolean bitstringp; boolean bitstringp ATTRIBUTE_UNUSED;
{ {
struct ieee_handle *info = (struct ieee_handle *) p; struct ieee_handle *info = (struct ieee_handle *) p;
boolean localp; boolean localp;
@ -7012,7 +7012,7 @@ ieee_typdef (p, name)
static boolean static boolean
ieee_tag (p, name) ieee_tag (p, name)
PTR p; PTR p;
const char *name; const char *name ATTRIBUTE_UNUSED;
{ {
struct ieee_handle *info = (struct ieee_handle *) p; struct ieee_handle *info = (struct ieee_handle *) p;
@ -7026,9 +7026,9 @@ ieee_tag (p, name)
static boolean static boolean
ieee_int_constant (p, name, val) ieee_int_constant (p, name, val)
PTR p; PTR p ATTRIBUTE_UNUSED;
const char *name; const char *name ATTRIBUTE_UNUSED;
bfd_vma val; bfd_vma val ATTRIBUTE_UNUSED;
{ {
/* FIXME. */ /* FIXME. */
return true; return true;
@ -7038,9 +7038,9 @@ ieee_int_constant (p, name, val)
static boolean static boolean
ieee_float_constant (p, name, val) ieee_float_constant (p, name, val)
PTR p; PTR p ATTRIBUTE_UNUSED;
const char *name; const char *name ATTRIBUTE_UNUSED;
double val; double val ATTRIBUTE_UNUSED;
{ {
/* FIXME. */ /* FIXME. */
return true; return true;
@ -7051,8 +7051,8 @@ ieee_float_constant (p, name, val)
static boolean static boolean
ieee_typed_constant (p, name, val) ieee_typed_constant (p, name, val)
PTR p; PTR p;
const char *name; const char *name ATTRIBUTE_UNUSED;
bfd_vma val; bfd_vma val ATTRIBUTE_UNUSED;
{ {
struct ieee_handle *info = (struct ieee_handle *) p; struct ieee_handle *info = (struct ieee_handle *) p;

View file

@ -1305,13 +1305,13 @@ print_archive_filename_bsd (filename)
static void static void
print_archive_filename_sysv (filename) print_archive_filename_sysv (filename)
char *filename; char *filename ATTRIBUTE_UNUSED;
{ {
} }
static void static void
print_archive_filename_posix (filename) print_archive_filename_posix (filename)
char *filename; char *filename ATTRIBUTE_UNUSED;
{ {
} }
@ -1319,7 +1319,7 @@ print_archive_filename_posix (filename)
static void static void
print_archive_member_bsd (archive, filename) print_archive_member_bsd (archive, filename)
char *archive; char *archive ATTRIBUTE_UNUSED;
CONST char *filename; CONST char *filename;
{ {
if (!filename_per_symbol) if (!filename_per_symbol)

View file

@ -467,7 +467,7 @@ is_specified_symbol (name, list)
static boolean static boolean
is_strip_section (abfd, sec) is_strip_section (abfd, sec)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
asection *sec; asection *sec;
{ {
struct section_list *p; struct section_list *p;
@ -605,7 +605,7 @@ filter_bytes (memhunk, size)
for (; from < end; from += interleave) for (; from < end; from += interleave)
*to++ = *from; *to++ = *from;
if (*size % interleave > copy_byte) if (*size % interleave > (bfd_size_type) copy_byte)
*size = (*size / interleave) + 1; *size = (*size / interleave) + 1;
else else
*size /= interleave; *size /= interleave;
@ -1360,7 +1360,7 @@ copy_section (ibfd, isection, obfdarg)
static void static void
get_sections (obfd, osection, secppparg) get_sections (obfd, osection, secppparg)
bfd *obfd; bfd *obfd ATTRIBUTE_UNUSED;
asection *osection; asection *osection;
PTR secppparg; PTR secppparg;
{ {
@ -1467,8 +1467,8 @@ static boolean
write_debugging_info (obfd, dhandle, symcountp, symppp) write_debugging_info (obfd, dhandle, symcountp, symppp)
bfd *obfd; bfd *obfd;
PTR dhandle; PTR dhandle;
long *symcountp; long *symcountp ATTRIBUTE_UNUSED;
asymbol ***symppp; asymbol ***symppp ATTRIBUTE_UNUSED;
{ {
if (bfd_get_flavour (obfd) == bfd_target_ieee_flavour) if (bfd_get_flavour (obfd) == bfd_target_ieee_flavour)
return write_ieee_debugging_info (obfd, dhandle); return write_ieee_debugging_info (obfd, dhandle);
@ -1807,15 +1807,21 @@ copy_main (argc, argv)
const char *s; const char *s;
int len; int len;
char *name; char *name;
char *option; char *option = NULL;
bfd_vma val; bfd_vma val;
enum change_action what; enum change_action what = CHANGE_IGNORE;
switch (c) switch (c)
{ {
case OPTION_CHANGE_SECTION_ADDRESS: option = "--change-section-address"; break; case OPTION_CHANGE_SECTION_ADDRESS:
case OPTION_CHANGE_SECTION_LMA: option = "--change-section-lma"; break; option = "--change-section-address";
case OPTION_CHANGE_SECTION_VMA: option = "--change-section-vma"; break; break;
case OPTION_CHANGE_SECTION_LMA:
option = "--change-section-lma";
break;
case OPTION_CHANGE_SECTION_VMA:
option = "--change-section-vma";
break;
} }
s = strchr (optarg, '='); s = strchr (optarg, '=');

View file

@ -289,9 +289,9 @@ static struct option long_options[]=
static void static void
dump_section_header (abfd, section, ignored) dump_section_header (abfd, section, ignored)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
asection *section; asection *section;
PTR ignored; PTR ignored ATTRIBUTE_UNUSED;
{ {
char *comma = ""; char *comma = "";
@ -1139,7 +1139,7 @@ objdump_sprintf (va_alist)
n = strlen (buf); 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; size_t curroff;
@ -1319,7 +1319,7 @@ disassemble_bytes (info, disassemble_fn, insns, data, start, stop, relppp,
} }
else else
{ {
long j; bfd_vma j;
bytes = bytes_per_line; bytes = bytes_per_line;
if (i + bytes > stop) 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
: show_raw_insn >= 0) : show_raw_insn >= 0)
{ {
long j; bfd_vma j;
/* If ! prefix_addresses and ! wide_output, we print /* If ! prefix_addresses and ! wide_output, we print
bytes_per_line bytes per line. */ bytes_per_line bytes per line. */
@ -1399,7 +1399,7 @@ disassemble_bytes (info, disassemble_fn, insns, data, start, stop, relppp,
{ {
while (pb < bytes) while (pb < bytes)
{ {
long j; bfd_vma j;
char *s; char *s;
putchar ('\n'); putchar ('\n');
@ -1871,7 +1871,7 @@ static void
print_section_stabs (abfd, stabsect_name, strsect_name) print_section_stabs (abfd, stabsect_name, strsect_name)
bfd *abfd; bfd *abfd;
const char *stabsect_name; const char *stabsect_name;
const char *strsect_name; const char *strsect_name ATTRIBUTE_UNUSED;
{ {
int i; int i;
unsigned file_string_table_offset = 0, next_file_string_table_offset = 0; 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? */ /* Should perhaps share code and display with nm? */
static void static void
dump_symbols (abfd, dynamic) dump_symbols (abfd, dynamic)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
boolean dynamic; boolean dynamic;
{ {
asymbol **current; asymbol **current;

View file

@ -1,5 +1,5 @@
/* prdbg.c -- Print out generic debugging information. /* 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>. Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils. This file is part of GNU Binutils.
@ -985,7 +985,7 @@ pr_fix_visibility (info, visibility)
struct pr_handle *info; struct pr_handle *info;
enum debug_visibility visibility; enum debug_visibility visibility;
{ {
const char *s; const char *s = NULL;
char *t; char *t;
unsigned int len; unsigned int len;
@ -1602,7 +1602,7 @@ pr_typdef (p, name)
static boolean static boolean
pr_tag (p, name) pr_tag (p, name)
PTR p; PTR p;
const char *name; const char *name ATTRIBUTE_UNUSED;
{ {
struct pr_handle *info = (struct pr_handle *) p; struct pr_handle *info = (struct pr_handle *) p;
char *t; char *t;
@ -1856,7 +1856,7 @@ pr_end_block (p, addr)
/*ARGSUSED*/ /*ARGSUSED*/
static boolean static boolean
pr_end_function (p) pr_end_function (p)
PTR p; PTR p ATTRIBUTE_UNUSED;
{ {
return true; return true;
} }

View file

@ -1,5 +1,5 @@
/* stabs.c -- Parse COFF debugging information /* 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>. Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils. This file is part of GNU Binutils.
@ -498,7 +498,7 @@ static debug_type
parse_coff_enum_type (abfd, symbols, types, pauxent, dhandle) parse_coff_enum_type (abfd, symbols, types, pauxent, dhandle)
bfd *abfd; bfd *abfd;
struct coff_symbols *symbols; struct coff_symbols *symbols;
struct coff_types *types; struct coff_types *types ATTRIBUTE_UNUSED;
union internal_auxent *pauxent; union internal_auxent *pauxent;
PTR dhandle; PTR dhandle;
{ {
@ -569,7 +569,7 @@ parse_coff_enum_type (abfd, symbols, types, pauxent, dhandle)
static boolean static boolean
parse_coff_symbol (abfd, types, sym, coff_symno, psyment, dhandle, type, parse_coff_symbol (abfd, types, sym, coff_symno, psyment, dhandle, type,
within_function) within_function)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
struct coff_types *types; struct coff_types *types;
asymbol *sym; asymbol *sym;
long coff_symno; long coff_symno;

View file

@ -1880,7 +1880,7 @@ process_program_headers (file)
? (section->sh_addr >= segment->p_vaddr ? (section->sh_addr >= segment->p_vaddr
&& section->sh_addr + section->sh_size && section->sh_addr + section->sh_size
<= segment->p_vaddr + segment->p_memsz) <= 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 && (section->sh_offset + section->sh_size
<= segment->p_offset + segment->p_filesz)))) <= segment->p_offset + segment->p_filesz))))
printf ("%s ", SECTION_NAME (section)); printf ("%s ", SECTION_NAME (section));
@ -2205,7 +2205,7 @@ process_relocs (file)
if (do_using_dynamic) if (do_using_dynamic)
{ {
int is_rela; int is_rela = FALSE;
rel_size = 0; rel_size = 0;
rel_offset = 0; rel_offset = 0;
@ -3549,7 +3549,7 @@ process_symbol_table (file)
Elf32_Internal_Shdr * section; Elf32_Internal_Shdr * section;
char nb [4]; char nb [4];
char nc [4]; char nc [4];
int nbuckets; int nbuckets = 0;
int nchains; int nchains;
int * buckets = NULL; int * buckets = NULL;
int * chains = NULL; int * chains = NULL;
@ -3884,9 +3884,9 @@ process_symbol_table (file)
static int static int
process_syminfo (file) process_syminfo (file)
FILE * file; FILE * file ATTRIBUTE_UNUSED;
{ {
int i; unsigned int i;
if (dynamic_syminfo == NULL if (dynamic_syminfo == NULL
|| !do_dynamic) || !do_dynamic)
@ -4179,7 +4179,7 @@ static int
display_debug_lines (section, start, file) display_debug_lines (section, start, file)
Elf32_Internal_Shdr * section; Elf32_Internal_Shdr * section;
unsigned char * start; unsigned char * start;
FILE * file; FILE * file ATTRIBUTE_UNUSED;
{ {
DWARF2_External_LineInfo * external; DWARF2_External_LineInfo * external;
DWARF2_Internal_LineInfo info; DWARF2_Internal_LineInfo info;
@ -4399,7 +4399,7 @@ static int
display_debug_pubnames (section, start, file) display_debug_pubnames (section, start, file)
Elf32_Internal_Shdr * section; Elf32_Internal_Shdr * section;
unsigned char * start; unsigned char * start;
FILE * file; FILE * file ATTRIBUTE_UNUSED;
{ {
DWARF2_External_PubNames * external; DWARF2_External_PubNames * external;
DWARF2_Internal_PubNames pubnames; DWARF2_Internal_PubNames pubnames;
@ -4821,7 +4821,7 @@ static int
display_debug_abbrev (section, start, file) display_debug_abbrev (section, start, file)
Elf32_Internal_Shdr * section; Elf32_Internal_Shdr * section;
unsigned char * start; unsigned char * start;
FILE * file; FILE * file ATTRIBUTE_UNUSED;
{ {
abbrev_entry * entry; abbrev_entry * entry;
unsigned char * end = start + section->sh_size; unsigned char * end = start + section->sh_size;
@ -5343,8 +5343,8 @@ read_and_display_attr (attribute, form, data, pointer_size)
unsigned char * data; unsigned char * data;
unsigned long pointer_size; unsigned long pointer_size;
{ {
unsigned long uvalue; unsigned long uvalue = 0;
unsigned char * block_start; unsigned char * block_start = NULL;
int bytes_read; int bytes_read;
int is_ref = 0; int is_ref = 0;
@ -5665,7 +5665,7 @@ display_debug_info (section, start, file)
while (tags < start) while (tags < start)
{ {
int bytes_read; int bytes_read;
int abbrev_number; unsigned long abbrev_number;
abbrev_entry * entry; abbrev_entry * entry;
abbrev_attr * attr; abbrev_attr * attr;
@ -5688,12 +5688,12 @@ display_debug_info (section, start, file)
if (entry == NULL) 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); abbrev_number);
return 0; return 0;
} }
printf (_(" <%d><%x>: Abbrev Number: %d (%s)\n"), printf (_(" <%d><%x>: Abbrev Number: %lu (%s)\n"),
level, tags - section_begin - bytes_read, level, tags - section_begin - bytes_read,
abbrev_number, abbrev_number,
get_TAG_name (entry->tag)); get_TAG_name (entry->tag));
@ -5718,7 +5718,7 @@ static int
display_debug_aranges (section, start, file) display_debug_aranges (section, start, file)
Elf32_Internal_Shdr * section; Elf32_Internal_Shdr * section;
unsigned char * start; unsigned char * start;
FILE * file; FILE * file ATTRIBUTE_UNUSED;
{ {
unsigned char * end = start + section->sh_size; unsigned char * end = start + section->sh_size;
@ -5778,8 +5778,8 @@ display_debug_aranges (section, start, file)
static int static int
display_debug_not_supported (section, start, file) display_debug_not_supported (section, start, file)
Elf32_Internal_Shdr * section; Elf32_Internal_Shdr * section;
unsigned char * start; unsigned char * start ATTRIBUTE_UNUSED;
FILE * file; FILE * file ATTRIBUTE_UNUSED;
{ {
printf (_("Displaying the debug contents of section %s is not yet supported.\n"), printf (_("Displaying the debug contents of section %s is not yet supported.\n"),
SECTION_NAME (section)); SECTION_NAME (section));
@ -5991,7 +5991,7 @@ process_mips_specific (file)
{ " DELTA", LL_DELTA } { " DELTA", LL_DELTA }
}; };
int flags = liblist.l_flags; int flags = liblist.l_flags;
int fcnt; size_t fcnt;
for (fcnt = 0; for (fcnt = 0;
fcnt < sizeof (l_flags_vals) / sizeof (l_flags_vals[0]); fcnt < sizeof (l_flags_vals) / sizeof (l_flags_vals[0]);

View file

@ -366,9 +366,9 @@ static bfd_size_type textsize;
static void static void
berkeley_sum (abfd, sec, ignore) berkeley_sum (abfd, sec, ignore)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
sec_ptr sec; sec_ptr sec;
PTR ignore; PTR ignore ATTRIBUTE_UNUSED;
{ {
flagword flags; flagword flags;
bfd_size_type size; bfd_size_type size;
@ -433,9 +433,9 @@ int svi_sizelen = 0;
static void static void
sysv_internal_sizer (file, sec, ignore) sysv_internal_sizer (file, sec, ignore)
bfd *file; bfd *file ATTRIBUTE_UNUSED;
sec_ptr sec; sec_ptr sec;
PTR ignore; PTR ignore ATTRIBUTE_UNUSED;
{ {
bfd_size_type size = bfd_section_size (file, sec); bfd_size_type size = bfd_section_size (file, sec);
if (!bfd_is_abs_section (sec) if (!bfd_is_abs_section (sec)
@ -454,9 +454,9 @@ sysv_internal_sizer (file, sec, ignore)
static void static void
sysv_internal_printer (file, sec, ignore) sysv_internal_printer (file, sec, ignore)
bfd *file; bfd *file ATTRIBUTE_UNUSED;
sec_ptr sec; sec_ptr sec;
PTR ignore; PTR ignore ATTRIBUTE_UNUSED;
{ {
bfd_size_type size = bfd_section_size (file, sec); bfd_size_type size = bfd_section_size (file, sec);
if (!bfd_is_abs_section (sec) if (!bfd_is_abs_section (sec)

View file

@ -375,7 +375,7 @@ warn_stab (p, err)
/*ARGSUSED*/ /*ARGSUSED*/
PTR PTR
start_stab (dhandle, abfd, sections, syms, symcount) start_stab (dhandle, abfd, sections, syms, symcount)
PTR dhandle; PTR dhandle ATTRIBUTE_UNUSED;
bfd *abfd; bfd *abfd;
boolean sections; boolean sections;
asymbol **syms; asymbol **syms;
@ -1818,7 +1818,7 @@ parse_stab_range_type (dhandle, info, typename, pp, typenums)
return debug_make_int_type (dhandle, 1, true); return debug_make_int_type (dhandle, 1, true);
else if (n3 == 0xffff) else if (n3 == 0xffff)
return debug_make_int_type (dhandle, 2, true); 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); return debug_make_int_type (dhandle, 4, true);
#ifdef BFD64 #ifdef BFD64
else if (n3 == ((((bfd_vma) 0xffffffff) << 32) | 0xffffffff)) else if (n3 == ((((bfd_vma) 0xffffffff) << 32) | 0xffffffff))
@ -3439,7 +3439,7 @@ stab_find_type (dhandle, info, typenums)
static boolean static boolean
stab_record_type (dhandle, info, typenums, type) stab_record_type (dhandle, info, typenums, type)
PTR dhandle; PTR dhandle ATTRIBUTE_UNUSED;
struct stab_handle *info; struct stab_handle *info;
const int *typenums; const int *typenums;
debug_type type; debug_type type;
@ -4513,7 +4513,7 @@ stab_demangle_template (minfo, pp, pname)
static boolean static boolean
stab_demangle_class (minfo, pp, pstart) stab_demangle_class (minfo, pp, pstart)
struct stab_demangle_info *minfo; struct stab_demangle_info *minfo ATTRIBUTE_UNUSED;
const char **pp; const char **pp;
const char **pstart; const char **pstart;
{ {

View file

@ -1,5 +1,5 @@
/* wrstabs.c -- Output stabs debugging information /* 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>. Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils. This file is part of GNU Binutils.
@ -984,7 +984,7 @@ static boolean
stab_function_type (p, argcount, varargs) stab_function_type (p, argcount, varargs)
PTR p; PTR p;
int argcount; int argcount;
boolean varargs; boolean varargs ATTRIBUTE_UNUSED;
{ {
struct stab_write_handle *info = (struct stab_write_handle *) p; struct stab_write_handle *info = (struct stab_write_handle *) p;
int i; int i;
@ -2383,7 +2383,7 @@ stab_end_block (p, addr)
/*ARGSUSED*/ /*ARGSUSED*/
static boolean static boolean
stab_end_function (p) stab_end_function (p)
PTR p; PTR p ATTRIBUTE_UNUSED;
{ {
return true; return true;
} }