From: Ian Lance Taylor Date: Tue, 16 Sep 2008 17:17:22 +0000 (+0000) Subject: * fileread.cc (make_view): Add casts to avoid warning. X-Git-Tag: reverse-20080930-branchpoint~111 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=de31bda5f611b1092f12d3db8c2ffcbb125c86fb;p=external%2Fbinutils.git * fileread.cc (make_view): Add casts to avoid warning. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index 0f67551..dc84079 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,7 @@ +2008-09-16 Ian Lance Taylor + + * fileread.cc (make_view): Add casts to avoid warning. + 2008-09-16 Alexandre Oliva * i386.cc (Target_i386::define_tls_base_symbol): Update comments. diff --git a/gold/fileread.cc b/gold/fileread.cc index f56e33e..883f8c8 100644 --- a/gold/fileread.cc +++ b/gold/fileread.cc @@ -356,7 +356,9 @@ File_read::make_view(off_t start, section_size_type size, gold_assert(size > 0); // Check that start and end of the view are within the file. - if (start > this->size_ || size > this->size_ - start) + if (start > this->size_ + || (static_cast(size) + > static_cast(this->size_ - start))) gold_fatal(_("%s: attempt to map %lld bytes at offset %lld exceeds " "size of file; the file may be corrupt"), this->filename().c_str(),