From ec8845e596facf709d2a0ac19f518452b8382260 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 14 Apr 2017 19:17:03 +0300 Subject: Fix code style. --- src/fs/virtfs/virtfsdir.cpp | 2 +- src/fs/virtfs/virtfszip.cpp | 4 ++-- src/fs/virtfs/virtfsziprwops.cpp | 2 +- src/fs/virtfs/zip.cpp | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/fs/virtfs') diff --git a/src/fs/virtfs/virtfsdir.cpp b/src/fs/virtfs/virtfsdir.cpp index 7f693b8ae..9eac0896b 100644 --- a/src/fs/virtfs/virtfsdir.cpp +++ b/src/fs/virtfs/virtfsdir.cpp @@ -493,7 +493,7 @@ namespace VirtFsDir buffer[fileSize - 1] = 0; #ifdef USE_FILE_FOPEN - const int cnt = fread(buffer, 1, fileSize, fd); + const int cnt = CAST_S32(fread(buffer, 1, fileSize, fd)); #else // USE_FILE_FOPEN const int cnt = ::read(fd, buffer, fileSize); #endif // USE_FILE_FOPEN diff --git a/src/fs/virtfs/virtfszip.cpp b/src/fs/virtfs/virtfszip.cpp index 8999cb54c..f2cacc34f 100644 --- a/src/fs/virtfs/virtfszip.cpp +++ b/src/fs/virtfs/virtfszip.cpp @@ -277,8 +277,8 @@ namespace VirtFsZip reportAlways("VirtFsZip::read buffer is null"); return 0; } - const uint32_t pos = file->mPos; - const uint32_t sz = file->mSize; + const uint32_t pos = CAST_S32(file->mPos); + const uint32_t sz = CAST_S32(file->mSize); // if outside of buffer, return if (pos >= sz) return 0; diff --git a/src/fs/virtfs/virtfsziprwops.cpp b/src/fs/virtfs/virtfsziprwops.cpp index 098b409e3..717227e46 100644 --- a/src/fs/virtfs/virtfsziprwops.cpp +++ b/src/fs/virtfs/virtfsziprwops.cpp @@ -73,7 +73,7 @@ namespace VirtFsZip } else if (whence == SEEK_END) { - pos = mSize + offset; + pos = static_cast(mSize + offset); } else { diff --git a/src/fs/virtfs/zip.cpp b/src/fs/virtfs/zip.cpp index 4ff58d584..f10f8f70d 100644 --- a/src/fs/virtfs/zip.cpp +++ b/src/fs/virtfs/zip.cpp @@ -150,7 +150,7 @@ namespace Zip header->fileName = std::string( reinterpret_cast(buf)); prepareFsPath(header->fileName); - header->dataOffset = ftell(arcFile) + extraFieldLen; + header->dataOffset = CAST_S32(ftell(arcFile) + extraFieldLen); fseek(arcFile, extraFieldLen + header->compressSize, SEEK_CUR); // pointer on 30 + fileNameLen + extraFieldLen + compressSize if (findLast(header->fileName, dirSeparator) == false) @@ -292,7 +292,7 @@ namespace Zip strm.next_in = in; strm.avail_in = header->compressSize; strm.next_out = out; - strm.avail_out = outSize; + strm.avail_out = CAST_U32(outSize); int ret = inflateInit2(&strm, -MAX_WBITS); if (ret != Z_OK) -- cgit v1.2.3-70-g09d2