Repository navigation
xgameruntime_test: build without MSVC warnings (BUILD-1384) - #4743
emirduran707 wants to merge 1 commit into
Conversation
The test opens its config files with fopen and _wfopen (C4996, three places), so the target gets _CRT_SECURE_NO_WARNINGS, as the other test targets that use plain fopen have it. The second `all` in main hid the first one (C4456); it is now `chain_answers`. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Kam471
left a comment
There was a problem hiding this comment.
Built and ran xgameruntime_test at 3db8ea4ab on Windows 11: xgameruntime_test: OK (128 checks), exit 0; git diff --check clean.
The test now builds under the project's MSVC warning level with the two shadowed locals renamed, and runtime/CMakeLists.txt applies the same compile options as the other tests. No behaviour change; no blocking issue.
|
Independent verification on Windows 11 (no GPU involved in this test).
Commands / results:
Red control: reverted both
Restored and rebuilt — 0 warnings, AI-assisted (Devin). |
|
Tested 3db8ea4 together with #4741 (f9e955d), merged onto main 98fa503, on Windows 11, VS 2026 (MSVC 14.52.37025), RTX 4060 Ti:
|
|
Clean merge with current main, compileall clean. Static review: the IXPackage flag rename preserves the test logic and _CRT_SECURE_NO_WARNINGS is scoped to the xgameruntime_test target only, which is the right shape. Main's 4f6b753 renamed a different shadowing flag, so no supersession — though the exact-IXPackage check still uses the unscoped all at the current tip. The warning-free-build claim needs the Windows CI run; the branch's checks are pending. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only review). |
|
Tested 3db8ea4 on Intel UHD Graphics 770, driver 32.0.101.7088: after clearing xgameruntime_test's object directory, the target rebuilds with exit 0 and no line containing "warning". xgameruntime_test.exe exits 0 with "xgameruntime_test: OK (128 checks)". The build on main was not run, so the four warnings in the description were not seen again here. AI-assisted. |
|
Tested
AI-assisted (Claude Code). |
Claimed in the coordination issue as: BUILD-1384, the
xgameruntime_test.cpphalf (claim). Thed3d12_vulkan_device_test.cpphalf is #4741.Depends on: none. It conflicts with #3408 and #2218 in
runtime/test/xgameruntime_test.cpp(measured withgit merge-tree). Both already conflict withmainindocs/runtime_imports.mdandruntime/shims/xgameruntime.cpp, and #2218 also in this test file. This pull request merges cleanly with #4741.What and why
A build of
xgameruntime_testonmain(98fa503f) prints four MSVC warnings, all from the test file. The other runtime tests build without warnings, so new ones are easy to miss (@etcetera-yt's finding).fopen,_wfopen,fopen): the target gets_CRT_SECURE_NO_WARNINGS, as the other test targets that use plainfopenhave it (d3d12_bundle_test,d3d12_first_light_test,tiny_game).bool allinmainhid the one at line 193. It is nowchain_answers. Nothing else changes in the test.The define is on the whole target, which also compiles four shim sources. Before the change the build showed no warning from those sources, so the define hides nothing that was visible there.
Tested
Windows 11, MSVC (Visual Studio 2022), Ninja, RelWithDebInfo. No GPU is involved in this test.
main98fa503f:cmake --build runtime/build --target xgameruntime_testprints 4 warnings (C4456 at 631; C4996 at 550, 570, 666).xgameruntime_test.exe: exit 0,OK (128 checks), among them "IXPackageImpl3 answers for IXPackageImpl and IXPackageImpl2 too", the check that uses the renamed local.Not run: the full
ctestsuite. The change touches one test target and no shim or runtime source.AI-assisted: yes (Claude Code)
Checklist
docs/design.md, with how it was confirmed. (Not a translator change.)🤖 Generated with Claude Code