Use explicit conversion to avoid warnings in cmELF

This commit is contained in:
Brad King 2009-10-06 08:33:05 -04:00
parent 6b14c1d273
commit d4ef3bcf59
1 changed files with 2 additions and 2 deletions

View File

@ -540,7 +540,7 @@ bool cmELFInternalImpl<Types>::LoadDynamicSection()
// Allocate the dynamic section entries. // Allocate the dynamic section entries.
ELF_Shdr const& sec = this->SectionHeaders[this->DynamicSectionIndex]; ELF_Shdr const& sec = this->SectionHeaders[this->DynamicSectionIndex];
int n = sec.sh_size / sec.sh_entsize; int n = static_cast<int>(sec.sh_size / sec.sh_entsize);
this->DynamicSectionEntries.resize(n); this->DynamicSectionEntries.resize(n);
// Read each entry. // Read each entry.
@ -592,7 +592,7 @@ unsigned long cmELFInternalImpl<Types>::GetDynamicEntryPosition(int j)
return 0; return 0;
} }
ELF_Shdr const& sec = this->SectionHeaders[this->DynamicSectionIndex]; ELF_Shdr const& sec = this->SectionHeaders[this->DynamicSectionIndex];
return sec.sh_offset + sec.sh_entsize*j; return static_cast<unsigned long>(sec.sh_offset + sec.sh_entsize*j);
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------