diff options
author | Ian Lance Taylor <ian@airs.com> | 2008-09-16 17:17:22 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2008-09-16 17:17:22 +0000 |
commit | de31bda5f611b1092f12d3db8c2ffcbb125c86fb (patch) | |
tree | 621d0671cee85ddbc82902e39a96b7468ccbf6d6 /gold/fileread.cc | |
parent | 0a36a439ee413816df8ab88a769135076e6355f6 (diff) | |
download | gdb-de31bda5f611b1092f12d3db8c2ffcbb125c86fb.zip gdb-de31bda5f611b1092f12d3db8c2ffcbb125c86fb.tar.gz gdb-de31bda5f611b1092f12d3db8c2ffcbb125c86fb.tar.bz2 |
* fileread.cc (make_view): Add casts to avoid warning.
Diffstat (limited to 'gold/fileread.cc')
-rw-r--r-- | gold/fileread.cc | 4 |
1 files changed, 3 insertions, 1 deletions
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<unsigned long long>(size) + > static_cast<unsigned long long>(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(), |