Merge pull request #28 from andrewgaul/fdcache-init-signedness-warning

Address signedness warning in FdCache::Init
This commit is contained in:
Takeshi Nakatani 2014-04-05 01:02:13 +09:00
commit 157612e7e7

View File

@ -265,7 +265,7 @@ int PageList::Init(off_t size, bool is_init)
{ {
Clear(); Clear();
for(off_t total = 0; total < size; total += FdManager::GetPageSize()){ for(off_t total = 0; total < size; total += FdManager::GetPageSize()){
size_t areasize = (total + FdManager::GetPageSize()) < size ? FdManager::GetPageSize() : static_cast<size_t>(size - total); size_t areasize = (total + static_cast<off_t>(FdManager::GetPageSize())) < size ? FdManager::GetPageSize() : static_cast<size_t>(size - total);
fdpage* page = new fdpage(total, areasize, is_init); fdpage* page = new fdpage(total, areasize, is_init);
pages.push_back(page); pages.push_back(page);
} }