libdw: Fix dwarf_getsrclines.c 32bit compile error.
authorMark Wielaard <mjw@redhat.com>
Tue, 11 Nov 2014 13:10:04 +0000 (14:10 +0100)
committerMark Wielaard <mjw@redhat.com>
Tue, 11 Nov 2014 13:10:09 +0000 (14:10 +0100)
__libdw_getsrclines should have been marked as internal_function in
both libdwP.h and dwarf_getsrclines.c. Do address_size comparison as
uint8_t to avoid signedness warning.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
libdw/ChangeLog
libdw/dwarf_getsrclines.c

index d5796e8..58736a6 100644 (file)
@@ -1,3 +1,9 @@
+2014-11-11  Mark Wielaard  <mjw@redhat.com>
+
+       * dwarf_getsrclines.c (read_srclines): Do address_size comparison
+       explicitly as uint8_t.
+       (__libdw_getsrclines): Add internal_function to declaration.
+
 2014-09-10  Petr Machata  <pmachata@redhat.com>
 
        * dwarf_macro_getparamcnt.c: New file.
index 4bb19c2..15881e8 100644 (file)
@@ -428,7 +428,7 @@ read_srclines (Dwarf *dbg,
                 apporiate for the target machine.  We use the
                 address size field from the CU header.  */
              op_index = 0;
-             if (unlikely (lineendp - linep < address_size))
+             if (unlikely (lineendp - linep < (uint8_t) address_size))
                goto invalid_data;
              if (__libdw_read_address_inc (dbg, IDX_debug_line, &linep,
                                            address_size, &addr))
@@ -730,6 +730,7 @@ files_lines_compare (const void *p1, const void *p2)
 }
 
 int
+internal_function
 __libdw_getsrclines (Dwarf *dbg, Dwarf_Off debug_line_offset,
                     const char *comp_dir, unsigned address_size,
                     Dwarf_Lines **linesp, Dwarf_Files **filesp)