mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-28 14:30:48 +00:00
* fileread.cc (make_view): Add casts to avoid warning.
This commit is contained in:
parent
0a36a439ee
commit
de31bda5f6
@ -1,3 +1,7 @@
|
||||
2008-09-16 Ian Lance Taylor <iant@google.com>
|
||||
|
||||
* fileread.cc (make_view): Add casts to avoid warning.
|
||||
|
||||
2008-09-16 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
* i386.cc (Target_i386::define_tls_base_symbol): Update comments.
|
||||
|
@ -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(),
|
||||
|
Loading…
Reference in New Issue
Block a user