From be2f3dec432cb1a3d46689cd3ea4402d25f12138 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 2 Jan 2008 23:55:37 +0000 Subject: [PATCH] Add cast to avoid signed/unsigned warning. --- gold/fileread.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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); -- 2.30.2