Add cast to avoid signed/unsigned warning.

This commit is contained in:
Ian Lance Taylor 2008-01-02 23:55:37 +00:00
parent d978b5be20
commit be2f3dec43
1 changed files with 5 additions and 2 deletions

View File

@ -454,8 +454,11 @@ File_read::read_multiple(off_t base, const Read_multiple& rm)
for (size_t k = i; k < j; ++k) for (size_t k = i; k < j; ++k)
{ {
const Read_multiple_entry& k_entry(rm[k]); const Read_multiple_entry& k_entry(rm[k]);
gold_assert(k_entry.file_offset - i_off + k_entry.size gold_assert((convert_to_section_size_type(k_entry.file_offset
<= end_off - i_off); - i_off)
+ k_entry.size)
<= convert_to_section_size_type(end_off
- i_off));
memcpy(k_entry.buffer, memcpy(k_entry.buffer,
v + (k_entry.file_offset - i_off), v + (k_entry.file_offset - i_off),
k_entry.size); k_entry.size);