diff options
| author | Takoroka <137927095+Takoroka@users.noreply.github.com> | 2026-10-27 11:46:04 -0400 |
|---|---|---|
| committer | Takoroka <137927095+Takoroka@users.noreply.github.com> | 2026-10-27 11:46:04 -0400 |
| commit | a05231f8782178d5a074de16aaba2ae0b118ccd4 (patch) | |
| tree | f959d1fca8f65730eb6efbabd23d6b2cb07bffc1 | |
| parent | 26a03d2473787abf3223b2d0e65b291eee00c1e1 (diff) | |
Fix build with MSVC 14.51 (VS 2026)
- sparse_large_vector: ULONG_PTR -> u64 needs static_cast, not reinterpret_cast
- zbic_compression: silence C4505/C5245 for the amalgamated zstd.c, which
is compiled as project code and hits /we4505
- launch_params: explicit int -> bool (C4800 is an error here)
| -rw-r--r-- | src/common/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/common/sparse_large_vector.cpp | 2 | ||||
| -rw-r--r-- | src/core/launch_params.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 5d1b30a549..aae4afd180 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -151,7 +151,7 @@ add_library( set_source_files_properties(zbic_compression.cpp PROPERTIES INCLUDE_DIRECTORIES "${ZBIC_INCLUDE_DIR}" - COMPILE_OPTIONS "$<$<CXX_COMPILER_ID:Clang,GNU>:-Wno-unused-function;-Wno-missing-declarations;-Wno-shadow>") + COMPILE_OPTIONS "$<$<CXX_COMPILER_ID:Clang,GNU>:-Wno-unused-function;-Wno-missing-declarations;-Wno-shadow>;$<$<CXX_COMPILER_ID:MSVC>:/wd4505;/wd5245>") if(WIN32) target_sources(common PRIVATE windows/timer_resolution.cpp diff --git a/src/common/sparse_large_vector.cpp b/src/common/sparse_large_vector.cpp index eee8ff6d18..b96340999d 100644 --- a/src/common/sparse_large_vector.cpp +++ b/src/common/sparse_large_vector.cpp @@ -26,7 +26,7 @@ static std::mutex vector_regions_mutex {}; // Workaround for handling non-commited memory accessed by Dynarmic; usually result of an error static LONG WINAPI FakePageFaultHandler(PEXCEPTION_POINTERS info) { DWORD code = info->ExceptionRecord->ExceptionCode; - u64 exception_addr = reinterpret_cast<u64>(info->ExceptionRecord->ExceptionInformation[1]); + u64 exception_addr = static_cast<u64>(info->ExceptionRecord->ExceptionInformation[1]); if (code != EXCEPTION_ACCESS_VIOLATION || info->ExceptionRecord->ExceptionInformation[0] == 1) { // Not our problem diff --git a/src/core/launch_params.cpp b/src/core/launch_params.cpp index a0483226ec..25fdd45fdb 100644 --- a/src/core/launch_params.cpp +++ b/src/core/launch_params.cpp @@ -94,7 +94,7 @@ LaunchParams ParseLaunchParams(Core::System& system, int argc, char *argv[], wch break; case 'u': { // Launch game with a specific user - bool argument_ok = isdigit(optarg[0]); + bool argument_ok = isdigit(optarg[0]) != 0; p.selected_user = atoi(optarg); if (!argument_ok) { // try to look it up by username, only finds the first username that matches. |
