From: Ian Lance Taylor Date: Wed, 2 Jan 2008 23:55:37 +0000 (+0000) Subject: Add cast to avoid signed/unsigned warning. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=be2f3dec432cb1a3d46689cd3ea4402d25f12138;p=binutils-gdb.git Add cast to avoid signed/unsigned warning. --- diff --git a/gold/fileread.cc b/gold/fileread.cc index 010c2eebbad..ac96f5fcf4a 100644 --- a/gold/fileread.cc +++ b/gold/fileread.cc @@ -454,8 +454,11 @@ File_read::read_multiple(off_t base, const Read_multiple& rm) for (size_t k = i; k < j; ++k) { const Read_multiple_entry& k_entry(rm[k]); - gold_assert(k_entry.file_offset - i_off + k_entry.size - <= end_off - i_off); + gold_assert((convert_to_section_size_type(k_entry.file_offset + - i_off) + + k_entry.size) + <= convert_to_section_size_type(end_off + - i_off)); memcpy(k_entry.buffer, v + (k_entry.file_offset - i_off), k_entry.size);