aboutsummaryrefslogtreecommitdiff
path: root/gold/archive.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-10-02 20:52:18 +0000
committerIan Lance Taylor <iant@google.com>2007-10-02 20:52:18 +0000
commitf5c3f2256ff4090c1d4a7d023c327eaed335ec27 (patch)
tree74bc6f47a27c846969a81db10d74492bf42b6db8 /gold/archive.cc
parente31dcd201e98f9a12d0cc5d77da608f9b4635cd6 (diff)
downloadgdb-f5c3f2256ff4090c1d4a7d023c327eaed335ec27.zip
gdb-f5c3f2256ff4090c1d4a7d023c327eaed335ec27.tar.gz
gdb-f5c3f2256ff4090c1d4a7d023c327eaed335ec27.tar.bz2
From Craig Silverstein: avoid some signed/unsigned warnings from gcc 4.2.
Diffstat (limited to 'gold/archive.cc')
-rw-r--r--gold/archive.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gold/archive.cc b/gold/archive.cc
index bbd24c8..d80718d 100644
--- a/gold/archive.cc
+++ b/gold/archive.cc
@@ -334,7 +334,7 @@ Archive::include_all_members(Symbol_table* symtab, Layout* layout,
off_t filesize = this->input_file_->file().filesize();
while (true)
{
- if (filesize - off < sizeof(Archive_header))
+ if (filesize - off < static_cast<off_t>(sizeof(Archive_header)))
{
if (filesize != off)
{
@@ -381,7 +381,7 @@ Archive::include_member(Symbol_table* symtab, Layout* layout,
std::string n;
this->read_header(off, &n);
- size_t memoff = off + sizeof(Archive_header);
+ const off_t memoff = off + static_cast<off_t>(sizeof(Archive_header));
// Read enough of the file to pick up the entire ELF header.
unsigned char ehdr_buf[elfcpp::Elf_sizes<64>::ehdr_size];