summaryrefslogtreecommitdiff
path: root/bfd/syms.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1999-07-11 19:49:48 +0000
committerIan Lance Taylor <ian@airs.com>1999-07-11 19:49:48 +0000
commit4126d3ea95f48508addd8cb4d2739b8f77307f7a (patch)
treef53883e0e162453d9f5cb65fba1a61363ec3308a /bfd/syms.c
parentb452a91aed9179442537f304cd1d31c5ed81b9aa (diff)
downloadgdb-4126d3ea95f48508addd8cb4d2739b8f77307f7a.tar.gz
* 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.c46
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: