aboutsummaryrefslogtreecommitdiff
path: root/bfd/dwarf2.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
commit7442e600c8d771f2d03c6df7415bbfcbf99759b6 (patch)
tree38991cc5caf814f1e631527af3c58342290b80ff /bfd/dwarf2.c
parent893e959397e8811195489b574f57fa21ab2f4c5e (diff)
downloadgdb-7442e600c8d771f2d03c6df7415bbfcbf99759b6.zip
gdb-7442e600c8d771f2d03c6df7415bbfcbf99759b6.tar.gz
gdb-7442e600c8d771f2d03c6df7415bbfcbf99759b6.tar.bz2
* 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/dwarf2.c')
-rw-r--r--bfd/dwarf2.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index 16986ad..143c3fa 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -1,5 +1,5 @@
/* DWARF 2 support.
- Copyright 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
Adapted from gdb/dwarf2read.c by Gavin Koch of Cygnus Solutions
(gavin@cygnus.com).
@@ -170,7 +170,7 @@ struct comp_unit {
static unsigned int
read_1_byte (abfd, buf)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
char *buf;
{
return bfd_get_8 (abfd, (bfd_byte *) buf);
@@ -178,7 +178,7 @@ read_1_byte (abfd, buf)
static int
read_1_signed_byte (abfd, buf)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
char *buf;
{
return bfd_get_signed_8 (abfd, (bfd_byte *) buf);
@@ -238,9 +238,9 @@ read_8_bytes (abfd, buf)
static char *
read_n_bytes (abfd, buf, size)
- bfd * abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
char *buf;
- unsigned int size;
+ unsigned int size ATTRIBUTE_UNUSED;
{
/* If the size of a host char is 8 bits, we can return a pointer
to the buffer, otherwise we have to copy the data to a buffer
@@ -250,7 +250,7 @@ read_n_bytes (abfd, buf, size)
static char *
read_string (abfd, buf, bytes_read_ptr)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
char *buf;
unsigned int *bytes_read_ptr;
{
@@ -268,7 +268,7 @@ read_string (abfd, buf, bytes_read_ptr)
static unsigned int
read_unsigned_leb128 (abfd, buf, bytes_read_ptr)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
char *buf;
unsigned int *bytes_read_ptr;
{
@@ -298,8 +298,8 @@ read_unsigned_leb128 (abfd, buf, bytes_read_ptr)
static int
read_signed_leb128 (abfd, buf, bytes_read_ptr)
- bfd * abfd;
- char * buf;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ char *buf;
unsigned int * bytes_read_ptr;
{
int result;
@@ -1236,7 +1236,7 @@ parse_comp_unit (abfd, info_ptr, end_ptr, abbrev_length)
struct comp_unit* unit;
unsigned short version;
- unsigned int abbrev_offset;
+ unsigned int abbrev_offset = 0;
unsigned char addr_size;
struct abbrev_info** abbrevs;
@@ -1457,7 +1457,7 @@ _bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
addr_size)
bfd *abfd;
asection *section;
- asymbol **symbols;
+ asymbol **symbols ATTRIBUTE_UNUSED;
bfd_vma offset;
const char **filename_ptr;
const char **functionname_ptr;