]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Ryan Bradetich's warning fixes.
authorAlan Modra <amodra@gmail.com>
Mon, 10 Jul 2000 05:14:13 +0000 (05:14 +0000)
committerAlan Modra <amodra@gmail.com>
Mon, 10 Jul 2000 05:14:13 +0000 (05:14 +0000)
bfd/ChangeLog
bfd/dwarf1.c
bfd/syms.c

index ee300e79992dbbf862cb37624a5a9f09fe2e88c9..84c8c113ce8701ff5e57a9fefce4ca3302810edc 100644 (file)
@@ -3,6 +3,12 @@
        * section.c (bfd_make_section_anyway): Start section_id at 0x10.
        (STD_SECTION): Avoid negative ids, instead use 0 to 3.
 
+       From Ryan Bradetich  <rbradetich@uswest.net>
+       * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
+       (parse_line_table): Ditto.
+       (_bfd_dwarf1_find_nearest_line): Ditto.
+       * syms.c (cmpindexentry): Remove extra `*' from params.
+
 2000-07-09  Koundinya K  <kk@ddeorg.soft.net>
 
         * elf32-mips.c (sort_dynamic_relocs): New Function.
index da184cc70589292806da12059441ead25c85ac24..62a3a61c1ad87da2f370178f2ee76597d006f10a 100644 (file)
@@ -1,5 +1,5 @@
 /* DWARF 1 find nearest line (_bfd_dwarf1_find_nearest_line).
-   Copyright 1998, 1999 Free Software Foundation, Inc.
+   Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
 
 Written by Gavin Romig-Koch of Cygnus Solutions (gavin@cygnus.com).  
 
@@ -184,7 +184,7 @@ parse_die (abfd, aDieInfo, aDiePtr)
   memset (aDieInfo,0,sizeof(*aDieInfo));
 
   /* First comes the length. */
-  aDieInfo->length = bfd_get_32 (abfd, xptr);
+  aDieInfo->length = bfd_get_32 (abfd, (bfd_byte *) xptr);
   xptr += 4;
   if (aDieInfo->length == 0)
     return false;
@@ -196,7 +196,7 @@ parse_die (abfd, aDieInfo, aDiePtr)
     }
 
   /* Then the tag. */
-  aDieInfo->tag = bfd_get_16 (abfd, xptr);
+  aDieInfo->tag = bfd_get_16 (abfd, (bfd_byte *) xptr);
   xptr += 2;
       
   /* Then the attributes. */
@@ -208,7 +208,7 @@ parse_die (abfd, aDieInfo, aDiePtr)
          must handle all dwarf1 forms, but need only handle the
         actual attributes that we care about. */
 
-      attr = bfd_get_16 (abfd, xptr);
+      attr = bfd_get_16 (abfd, (bfd_byte *) xptr);
       xptr += 2;
       
       switch (FORM_FROM_ATTR (attr))
@@ -219,10 +219,10 @@ parse_die (abfd, aDieInfo, aDiePtr)
        case FORM_DATA4:
        case FORM_REF:
          if (attr == AT_sibling)
-           aDieInfo->sibling = bfd_get_32 (abfd, xptr);
+           aDieInfo->sibling = bfd_get_32 (abfd, (bfd_byte *) xptr);
          else if (attr == AT_stmt_list)
            {
-             aDieInfo->stmt_list_offset = bfd_get_32 (abfd, xptr);
+             aDieInfo->stmt_list_offset = bfd_get_32 (abfd, (bfd_byte *) xptr);
              aDieInfo->has_stmt_list = 1;
            }
          xptr += 4;
@@ -232,16 +232,16 @@ parse_die (abfd, aDieInfo, aDiePtr)
          break;
        case FORM_ADDR:
          if (attr == AT_low_pc)
-           aDieInfo->low_pc = bfd_get_32 (abfd, xptr);
+           aDieInfo->low_pc = bfd_get_32 (abfd, (bfd_byte *) xptr);
          else if (attr == AT_high_pc)
-           aDieInfo->high_pc = bfd_get_32 (abfd, xptr);
+           aDieInfo->high_pc = bfd_get_32 (abfd, (bfd_byte *) xptr);
          xptr += 4;
          break;
        case FORM_BLOCK2:
-         xptr += 2 + bfd_get_16 (abfd, xptr);
+         xptr += 2 + bfd_get_16 (abfd, (bfd_byte *) xptr);
          break;
        case FORM_BLOCK4:
-         xptr += 4 + bfd_get_32 (abfd, xptr);
+         xptr += 4 + bfd_get_32 (abfd, (bfd_byte *) xptr);
          break;
        case FORM_STRING:
          if (attr == AT_name)
@@ -276,7 +276,7 @@ parse_line_table (stash, aUnit)
        return false;
          
       size = bfd_get_section_size_before_reloc (msec);
-      stash->line_section = (unsigned char*) bfd_alloc (stash->abfd, size);
+      stash->line_section = (char *) bfd_alloc (stash->abfd, size);
       
       if (! stash->line_section)
        return false;
@@ -299,11 +299,11 @@ parse_line_table (stash, aUnit)
       unsigned long base;
 
       /* First comes the length. */
-      tblend = bfd_get_32 (stash->abfd, xptr) + xptr;
+      tblend = bfd_get_32 (stash->abfd, (bfd_byte *) xptr) + xptr;
       xptr += 4;
 
       /* Then the base address for each address in the table. */
-      base = bfd_get_32 (stash->abfd, xptr);
+      base = bfd_get_32 (stash->abfd, (bfd_byte *) xptr);
       xptr += 4;
 
       /* How many line entrys?
@@ -311,7 +311,7 @@ parse_line_table (stash, aUnit)
       aUnit->line_count = (tblend - xptr) / 10;
 
       /* Allocate an array for the entries. */
-      aUnit->linenumber_table = (struct linenumber*)
+      aUnit->linenumber_table = (struct linenumber *)
        bfd_alloc (stash->abfd, 
                   sizeof (struct linenumber) * aUnit->line_count);
        
@@ -319,7 +319,7 @@ parse_line_table (stash, aUnit)
        {
          /* A line number. */
          aUnit->linenumber_table[eachLine].linenumber
-           = bfd_get_32 (stash->abfd, xptr);
+           = bfd_get_32 (stash->abfd, (bfd_byte *) xptr);
          xptr += 4;
 
          /* Skip the position within the line. */
@@ -327,7 +327,7 @@ parse_line_table (stash, aUnit)
 
          /* And finally the address. */
          aUnit->linenumber_table[eachLine].addr 
-           = base + bfd_get_32 (stash->abfd, xptr);
+           = base + bfd_get_32 (stash->abfd, (bfd_byte *) xptr);
          xptr += 4;
        }
     }
@@ -495,7 +495,7 @@ _bfd_dwarf1_find_nearest_line (abfd, section, symbols, offset,
        }
 
       size = bfd_get_section_size_before_reloc (msec);
-      stash->debug_section = (unsigned char*) bfd_alloc (abfd, size);
+      stash->debug_section = (char *) bfd_alloc (abfd, size);
       
       if (! stash->debug_section)
        return false;
index 305c9b06c4d741d3d4f77f5a0b9b223560d1547b..82c81120f88a454533cf90ea9c70b2d4fa242725 100644 (file)
@@ -1,5 +1,5 @@
 /* Generic symbol-table support for the BFD library.
-   Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+   Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -788,8 +788,8 @@ struct indexentry
 
 static int
 cmpindexentry (a, b)
-     const PTR *a;
-     const PTR *b;
+     const PTR a;
+     const PTR b;
 {
   const struct indexentry *contestantA = (const struct indexentry *) a;
   const struct indexentry *contestantB = (const struct indexentry *) b;