fixed a warning

This commit is contained in:
Guenter Obiltschnig 2017-11-10 08:51:22 +01:00
parent 6fef7a3ae0
commit 6ab7e11c16

View File

@ -132,7 +132,7 @@ private:
void init(const Poco::Path& fileName, ZipCommon::CompressionMethod cm, ZipCommon::CompressionLevel cl);
Poco::UInt16 getFileNameLength() const;
Poco::UInt16 getExtraFieldLength() const;
Poco::UInt32 getCRCFromHeader() const;
@ -203,7 +203,7 @@ private:
Poco::UInt32 _crc32;
Poco::UInt64 _compressedSize;
Poco::UInt64 _uncompressedSize;
friend class ZipStreamBuf;
};
@ -308,7 +308,7 @@ inline std::streamoff ZipLocalFileHeader::getStartPos() const
inline void ZipLocalFileHeader::setStartPos(std::streamoff start)
{
_startPos = start;
_endPos = start + getHeaderSize()+getCompressedSize();
_endPos = start + getHeaderSize()+static_cast<std::streamoff>(getCompressedSize());
}
@ -354,7 +354,7 @@ inline void ZipLocalFileHeader::setCompressionLevel(ZipCommon::CompressionLevel
{
// bit 1 and 2 indicate the level
Poco::UInt16 val = static_cast<Poco::UInt16>(cl);
val <<= 1;
val <<= 1;
Poco::UInt16 mask = 0xfff9;
_rawHeader[GENERAL_PURPOSE_POS] = ((_rawHeader[GENERAL_PURPOSE_POS] & mask) | val);
}
@ -494,7 +494,7 @@ inline std::streamoff ZipLocalFileHeader::getDataStartPos() const
inline std::streamoff ZipLocalFileHeader::getDataEndPos() const
{
return getDataStartPos()+getCompressedSize();
return getDataStartPos()+static_cast<std::streamoff>(getCompressedSize());
}