diff options
-rw-r--r-- | gold/archive.cc | 4 | ||||
-rw-r--r-- | gold/dynobj.cc | 2 | ||||
-rw-r--r-- | gold/layout.cc | 2 | ||||
-rw-r--r-- | gold/object.cc | 2 | ||||
-rw-r--r-- | gold/reloc.cc | 4 |
5 files changed, 7 insertions, 7 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]; diff --git a/gold/dynobj.cc b/gold/dynobj.cc index 09e7126..5817720 100644 --- a/gold/dynobj.cc +++ b/gold/dynobj.cc @@ -629,7 +629,7 @@ Sized_dynobj<size, big_endian>::do_add_symbols(Symbol_table* symtab, const int sym_size = This::sym_size; const size_t symcount = sd->symbols_size / sym_size; - if (symcount * sym_size != sd->symbols_size) + if (static_cast<off_t>(symcount * sym_size) != sd->symbols_size) { fprintf(stderr, _("%s: %s: size of dynamic symbols is not " diff --git a/gold/layout.cc b/gold/layout.cc index 83c8c6a..9dad4b0 100644 --- a/gold/layout.cc +++ b/gold/layout.cc @@ -891,7 +891,7 @@ Layout::create_symtab_sections(const Input_objects* input_objects, off_t locsize = dyn_global_index * this->dynsym_section_->entsize(); dynoff = this->dynsym_section_->offset() + locsize; dyncount = (this->dynsym_section_->data_size() - locsize) / symsize; - gold_assert(dyncount * symsize + gold_assert(static_cast<off_t>(dyncount * symsize) == this->dynsym_section_->data_size() - locsize); } diff --git a/gold/object.cc b/gold/object.cc index 3051909..2dbd0f2 100644 --- a/gold/object.cc +++ b/gold/object.cc @@ -502,7 +502,7 @@ Sized_relobj<size, big_endian>::do_add_symbols(Symbol_table* symtab, const int sym_size = This::sym_size; size_t symcount = sd->symbols_size / sym_size; - if (symcount * sym_size != sd->symbols_size) + if (static_cast<off_t>(symcount * sym_size) != sd->symbols_size) { fprintf(stderr, _("%s: %s: size of symbols is not multiple of symbol size\n"), diff --git a/gold/reloc.cc b/gold/reloc.cc index ad3bb05..bf4b2d6 100644 --- a/gold/reloc.cc +++ b/gold/reloc.cc @@ -231,7 +231,7 @@ Sized_relobj<size, big_endian>::do_read_relocs(Read_relocs_data* rd) } size_t reloc_count = sh_size / reloc_size; - if (reloc_count * reloc_size != sh_size) + if (static_cast<off_t>(reloc_count * reloc_size) != sh_size) { fprintf(stderr, _("%s: %s: reloc section %u size %lu uneven"), program_name, this->name().c_str(), i, @@ -478,7 +478,7 @@ Sized_relobj<size, big_endian>::relocate_sections( } size_t reloc_count = sh_size / reloc_size; - if (reloc_count * reloc_size != sh_size) + if (static_cast<off_t>(reloc_count * reloc_size) != sh_size) { fprintf(stderr, _("%s: %s: reloc section %u size %lu uneven"), program_name, this->name().c_str(), i, |