Repository navigation
runtime tests: fix the six MSVC warnings (BUILD-1384) - #4775
kingzzim7-create wants to merge 1 commit into
Conversation
xgameruntime_test: _CRT_SECURE_NO_WARNINGS on the target for its plain fopen/_wfopen (C4996 at 550/570/666), and the inner 'all' renamed all_ids (C4456 at 631). d3d12_vulkan_device_test: the inner 'readable' and 'zero' renamed copy_source and expect_zero (C4456 at 6743/6750).
Kam471
left a comment
There was a problem hiding this comment.
Built and ran both at 2653dd1c2 on Windows 11, RTX 5070 Ti:
d3d12_vulkan_device_test-> exit 0 (all sections matched).xgameruntime_test-> OK (128 checks), exit 0.
The six MSVC warnings in the two test files are fixed by renaming/typing the shadowed locals, and runtime/CMakeLists.txt applies the same options as the other tests; no behaviour change. git diff --check clean. No blocking issue.
|
PASS. Single commit on current
Approve. AI-assisted review, no game files. |
Claimed
BUILD-1384, claimed on #4683.
What and why
On
main98fa503 the runtime tests build with six warnings under MSVC 14.52, which makes new ones easy to miss:runtime/CMakeLists.txt:xgameruntime_testgets_CRT_SECURE_NO_WARNINGS, astiny_game,d3d12_bundle_testand the other test targets already have. This clears C4996 for its plainfopen/_wfopenatxgameruntime_test.cpp:550, 570, 666.runtime/test/xgameruntime_test.cpp:631: the innerall(the IXPackageImpl chain check) is renamedall_ids(C4456).runtime/test/d3d12_vulkan_device_test.cpp:6743/6750: the innerreadableandzeroin the D3D-71 NOT_ZEROED block are renamedcopy_sourceandexpect_zero(C4456).zeroedwas avoided because the outer scope already uses it.These are renames and a define only, so no test behaviour changes. #3408 and #2218 add code to
xgameruntime_test.cppand one source line to the same CMake target, but they change none of these lines.Tested
Windows 11, VS 2026 (MSVC 14.52.37025), RTX 4060 Ti.
main98fa503:build_runtime.ps1shows exactly the six warnings listed in BUILD-1384.uav_clear.h(206)C4834, which uav_clear.h: discard frexp's mantissa explicitly (fixes MSVC C4834) #4216 fixes.ctest: 100% passed, 0 failed out of 173 (1 disabled, the usual skips).git diff --checkis clean. The diff is 3 files, +8 −8.Checklist
AI-assisted: yes (Claude).