* fileread.cc (make_view): Add casts to avoid warning.
authorIan Lance Taylor <ian@airs.com>
Tue, 16 Sep 2008 17:17:22 +0000 (17:17 +0000)
committerIan Lance Taylor <ian@airs.com>
Tue, 16 Sep 2008 17:17:22 +0000 (17:17 +0000)
gold/ChangeLog
gold/fileread.cc

index 0f67551bee6a1cfa0c34e0f27fb59bb2a4d9e928..dc8407942b6d15afc084996f48c1ab0fccbb18bb 100644 (file)
@@ -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.
index f56e33e39f16fdd90a452a38dc73b71fc1e290b4..883f8c80895b987ddb84969666568ef1146b1132 100644 (file)
@@ -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(),
This page took 0.0284 seconds and 4 git commands to generate.