#1430 Correcting MSVC build breaker in r4639

This commit is contained in:
Robin Mills 2016-10-18 10:11:39 +00:00
parent 11e160dec8
commit b9f584fbbf
3 changed files with 9 additions and 8 deletions

View File

@ -1907,22 +1907,23 @@ namespace Exiv2 {
byte* RemoteIo::mmap(bool /*isWriteable*/)
{
long nRealData = 0 ;
size_t nRealData = 0 ;
if ( !bigBlock_ ) {
int blockSize = p_->blockSize_;
int blocks = (p_->size_ + blockSize -1)/blockSize ;
size_t blockSize = p_->blockSize_;
size_t blocks = (p_->size_ + blockSize -1)/blockSize ;
bigBlock_ = new byte[blocks*blockSize] ;
for ( int block = 0 ; block < blocks ; block ++ ) {
for ( size_t block = 0 ; block < blocks ; block ++ ) {
void* p = p_->blocksMap_[block].getData();
if ( p ) {
nRealData += blockSize ;
memcpy(bigBlock_+(block*blockSize),p,blockSize);
}
}
}
#ifdef DEBUG
std::cerr << "RemoteIo::mmap nRealData = " << nRealData << std::endl;
std::cerr << "RemoteIo::mmap nRealData = " << nRealData << std::endl;
#endif
}
return bigBlock_;
}

View File

@ -136,7 +136,7 @@ namespace Exiv2 {
try {
std::ofstream devnull;
printStructure(devnull,kpsRecursive,0);
} catch (Exiv2::Error& e) {
} catch (Exiv2::Error& /* e */) {
DataBuf file(io().size());
io_->read(file.pData_,file.size_);
}

View File

@ -486,7 +486,7 @@ namespace Exiv2
lf(out,bLF);
while (io_->read((byte*)&subBox, sizeof(subBox)) == sizeof(subBox)
&& io_->tell() < position + box.length) // don't read beyond the box!
&& io_->tell() < position + (long) box.length) // don't read beyond the box!
{
subBox.length = getLong((byte*)&subBox.length, bigEndian);
subBox.type = getLong((byte*)&subBox.type, bigEndian);