From 38047acd256fb07ad7b6f6d7a380cbb1c3fbc0ae Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sun, 11 Jul 1999 20:02:30 +0000 Subject: * 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. --- binutils/objdump.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'binutils/objdump.c') diff --git a/binutils/objdump.c b/binutils/objdump.c index b7ee5d6283..1cd5fb671c 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; -- cgit v1.2.1