Address signedness warning in FdCache::Init

This commit allows GCC 4.8 to compile s3fs withing warnings.
This commit is contained in:
Andrew Gaul 2014-04-01 21:06:03 -07:00
parent e23ea87953
commit d475e22774

View File

@ -266,7 +266,7 @@ int PageList::Init(off_t size, bool is_init)
{
Clear();
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);
pages.push_back(page);
}