diff options
author | Jan Beulich <jbeulich@suse.com> | 2021-06-07 08:37:42 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2021-06-07 08:48:26 +0200 |
commit | 6bee34a1dc94dcfbf84b6318a731e6b059b39977 (patch) | |
tree | a7c9b95437b8a88d1a68da4b0139c3f65330a269 /binutils/dwarf.c | |
parent | 53f18dfd3e790c6320db7496252921dbd26a086b (diff) | |
download | gdb-6bee34a1dc94dcfbf84b6318a731e6b059b39977.zip gdb-6bee34a1dc94dcfbf84b6318a731e6b059b39977.tar.gz gdb-6bee34a1dc94dcfbf84b6318a731e6b059b39977.tar.bz2 |
fix Dwarf2 build with certain gcc versions
Older gcc reports:
.../bfd/dwarf2.c: In function 'read_ranges':
.../bfd/dwarf2.c:3107: error: comparison between signed and unsigned
.../bfd/dwarf2.c: In function 'read_rnglists':
.../bfd/dwarf2.c:3189: error: comparison between signed and unsigned
Similarly for binutils/dwarf.c. Arrange for the left sides of the > to
also be unsigned quantities.
Diffstat (limited to 'binutils/dwarf.c')
-rw-r--r-- | binutils/dwarf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/binutils/dwarf.c b/binutils/dwarf.c index cfc1436..b3ec890 100644 --- a/binutils/dwarf.c +++ b/binutils/dwarf.c @@ -7284,7 +7284,7 @@ display_debug_aranges (struct dwarf_section *section, start = end_ranges; - while (2 * address_size <= (size_t) (start - addr_ranges)) + while (2u * address_size <= (size_t) (start - addr_ranges)) { SAFE_BYTE_GET_AND_INC (address, addr_ranges, address_size, start); SAFE_BYTE_GET_AND_INC (length, addr_ranges, address_size, start); |