Emulator Issues #12208
closedDolphin failed to build due to warning C4267
0%
Description
Environment:
Windows Server 2016 + VS2019 latest version + dolphin master branch latest srouce code b5d9756.
Description:
Dolphin failed to build due to warning C4267. Could you help have a look about this issue? Thanks in advance!
Steps to reproduce the behavior:
- git clone https://github.com/dolphin-emu/dolphin.git D:\Dolphin\src
- git submodule init
- git submodule update --recursive
- Open a VS 2019 x64 command prompt and browse to D:\Dolphin\src
- msbuild /m /p:Platform=x64 /p:Configuration=Release /p:WindowsTargetPlatformVersion=10.0.18362.0 dolphin-emu.sln /t:Dolphin
Actual result:
F:\gitP\dolphin-emu\dolphin\Source\Core\DiscIO\WIABlob.cpp(449,1): error C2220: the following warning is treated as an error
std::max(1, chunk_size / VolumeWii::GROUP_DATA_SIZE)))
^
F:\gitP\dolphin-emu\dolphin\Source\Core\DiscIO\WIABlob.cpp(424): note: while compiling class template member function 'bool DiscIO::WIARVZFileReader::ReadWiiDecrypted(u64,u64,u8 *,u64)'
{
F:\gitP\dolphin-emu\dolphin\Source\Core\DiscIO\WIABlob.cpp(2015): note: see reference to class template instantiation 'DiscIO::WIARVZFileReader' being compiled
const auto convert = rvz ? RVZFileReader::Convert : WIAFileReader::Convert;
F:\gitP\dolphin-emu\dolphin\Source\Core\DiscIO\WIABlob.cpp(449,1): warning C4267: 'argument': conversion from 'size_t' to 'u32', possible loss of data
std::max(1, chunk_size / VolumeWii::GROUP_DATA_SIZE)))
Files
Updated by JosJuice over 4 years ago
- Status changed from New to Fix pending
Should be fixed by https://github.com/dolphin-emu/dolphin/pull/8990, but I can't reproduce the problem myself (perhaps because I'm still on VS 16.5).
Updated by QuellaZhang over 4 years ago
Thanks Jos, I have verified this issue has been fixed. The MSVC team use Dolphin as a part of RWC testing to detect compiler regression, I found this issue on the latest compiler version.
Updated by JosJuice over 4 years ago
- Status changed from Fix pending to Fixed
- Fixed in set to 5.0-12360