diff options
author | Roland McGrath <roland@redhat.com> | 2010-06-22 13:13:53 -0700 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 2010-06-22 13:13:53 -0700 |
commit | 499b8ff4be1b82f47b04529e6cf22f94d6bd45ac (patch) | |
tree | 1e58c13c7fef93e9e636172ce1af5dac7c877628 /libdw | |
parent | 898ca1a4f94cf8331d2d4f15d5cc6b68bc6759b9 (diff) | |
download | elfutils-499b8ff4be1b82f47b04529e6cf22f94d6bd45ac.tar.gz |
Fix signed comparison warning in extended opcode parsing.
Diffstat (limited to 'libdw')
-rw-r--r-- | libdw/ChangeLog | 5 | ||||
-rw-r--r-- | libdw/dwarf_getsrclines.c | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/libdw/ChangeLog b/libdw/ChangeLog index c87634fd..5d274cb5 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@ -1,3 +1,8 @@ +2010-06-22 Roland McGrath <roland@redhat.com> + + * dwarf_getsrclines.c: Fix signed comparison warning in extended + opcode parsing. + 2010-06-21 Roland McGrath <roland@redhat.com> * dwarf.h: Add DW_TAG_GNU_* constants. diff --git a/libdw/dwarf_getsrclines.c b/libdw/dwarf_getsrclines.c index afdf9dba..6840b2b5 100644 --- a/libdw/dwarf_getsrclines.c +++ b/libdw/dwarf_getsrclines.c @@ -433,9 +433,9 @@ dwarf_getsrclines (Dwarf_Die *cudie, Dwarf_Lines **lines, size_t *nlines) goto invalid_data; /* The length. */ - unsigned int len = *linep++; + uint_fast8_t len = *linep++; - if (unlikely (lineendp - linep < len)) + if (unlikely ((size_t) (lineendp - linep) < len)) goto invalid_data; /* The sub-opcode. */ @@ -530,7 +530,7 @@ dwarf_getsrclines (Dwarf_Die *cudie, Dwarf_Lines **lines, size_t *nlines) default: /* Unknown, ignore it. */ - if (unlikely (lineendp - (linep - 1)) < len) + if (unlikely ((size_t) (lineendp - (linep - 1)) < len)) goto invalid_data; linep += len - 1; break; |