From: <man...@us...> - 2015-02-21 18:29:30
|
Revision: 4782 http://sourceforge.net/p/modplug/code/4782 Author: manxorist Date: 2015-02-21 18:29:17 +0000 (Sat, 21 Feb 2015) Log Message: ----------- [Ref] Unarchiver: Silence 64bit warning in unlha. Modified Paths: -------------- trunk/OpenMPT/common/FileReader.h trunk/OpenMPT/unarchiver/unlha.cpp Modified: trunk/OpenMPT/common/FileReader.h =================================================================== --- trunk/OpenMPT/common/FileReader.h 2015-02-21 18:13:10 UTC (rev 4781) +++ trunk/OpenMPT/common/FileReader.h 2015-02-21 18:29:17 UTC (rev 4782) @@ -281,6 +281,14 @@ streamPos += result; return result; } + std::size_t ReadRaw(void *dst, std::size_t count) + { + return ReadRaw(reinterpret_cast<char*>(dst), count); + } + std::size_t ReadRaw(uint8 *dst, std::size_t count) + { + return ReadRaw(reinterpret_cast<char*>(dst), count); + } protected: Modified: trunk/OpenMPT/unarchiver/unlha.cpp =================================================================== --- trunk/OpenMPT/unarchiver/unlha.cpp 2015-02-21 18:13:10 UTC (rev 4781) +++ trunk/OpenMPT/unarchiver/unlha.cpp 2015-02-21 18:29:17 UTC (rev 4782) @@ -18,7 +18,8 @@ static int LHAreadFileReader(void *handle, void *buf, size_t buf_len) { FileReader *f = reinterpret_cast<FileReader*>(handle); - int result = f->ReadRaw((char*)buf, buf_len); + int read_len = mpt::saturate_cast<int>(buf_len); + int result = mpt::saturate_cast<int>(f->ReadRaw(buf, read_len)); if(result == 0) { return -1; @@ -39,6 +40,7 @@ static void LHAcloseFileReader(void * /*handle*/) { + return; } static LHAInputStreamType vtable = This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |