diff options
author | Ian Lance Taylor <ian@airs.com> | 1999-07-11 19:49:48 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1999-07-11 19:49:48 +0000 |
commit | 7442e600c8d771f2d03c6df7415bbfcbf99759b6 (patch) | |
tree | 38991cc5caf814f1e631527af3c58342290b80ff /bfd/syms.c | |
parent | 893e959397e8811195489b574f57fa21ab2f4c5e (diff) | |
download | binutils-7442e600c8d771f2d03c6df7415bbfcbf99759b6.tar.gz binutils-7442e600c8d771f2d03c6df7415bbfcbf99759b6.tar.bz2 binutils-7442e600c8d771f2d03c6df7415bbfcbf99759b6.zip |
* 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.
Diffstat (limited to 'bfd/syms.c')
-rw-r--r-- | bfd/syms.c | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/bfd/syms.c b/bfd/syms.c index f69d1f21fa4..108e3eac27b 100644 --- a/bfd/syms.c +++ b/bfd/syms.c @@ -1,5 +1,5 @@ /* 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. @@ -698,10 +698,10 @@ _bfd_generic_read_minisymbols (abfd, dynamic, minisymsp, sizep) /*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; - asymbol *sym; + asymbol *sym ATTRIBUTE_UNUSED; { 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; - 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; @@ -1032,23 +1033,24 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound, 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: |