Project

General

Profile

Actions

Emulator Issues #12208

closed

Dolphin failed to build due to warning C4267

Added by QuellaZhang over 3 years ago. Updated over 3 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:
5.0-12360

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:

  1. git clone https://github.com/dolphin-emu/dolphin.git D:\Dolphin\src
  2. git submodule init
  3. git submodule update --recursive
  4. Open a VS 2019 x64 command prompt and browse to D:\Dolphin\src
  5. 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

dolphin.txt (487 KB) dolphin.txt QuellaZhang, 07/29/2020 02:49 AM
Actions #1

Updated by Techjar over 3 years ago

How did that get past buildbot?

Actions #2

Updated by JosJuice over 3 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).

Actions #3

Updated by QuellaZhang over 3 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.

Actions #4

Updated by JosJuice over 3 years ago

  • Status changed from Fix pending to Fixed
  • Fixed in set to 5.0-12360
Actions

Also available in: Atom PDF