Skip to content

d3d12_boot_movie_test: drop unused label parameter on present lambda (C4100) - #7793

Open
al3xar wants to merge 1 commit into
ItsNotRexed:mainfrom
al3xar:fix/d3d12-boot-movie-test-c4100
Open

al3xar wants to merge 1 commit into
ItsNotRexed:mainfrom
al3xar:fix/d3d12-boot-movie-test-c4100

Conversation

@al3xar

@al3xar al3xar commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Claim: #7599 (comment)

In runtime/test/d3d12_boot_movie_test.cpp:648, the local present lambda took const char* label and never referenced it, emitting MSVC /W4 warning C4100 on every build:

runtime\test\d3d12_boot_movie_test.cpp(648): warning C4100: 'label': unreferenced formal parameter

Dropping the unused label parameter from present and its two call sites clears the warning with no behaviour change.

Verification

Built with MSVC 19.44.35230.0 (CMake + Ninja, RelWithDebInfo, Windows 11, NVIDIA GeForce RTX 3060 / driver 621.24):

  • cmake --build runtime/build-pr3 --target d3d12_boot_movie_test: exits 0 with zero warnings in d3d12_boot_movie_test.cpp.
  • d3d12_boot_movie_test.exe (without LEONIDA_MOVIE): SKIP (no package/movie) (exit 77).
  • python -I scripts/check_no_game_data.py runtime/test/d3d12_boot_movie_test.cpp: pass.

AI-assisted.

@MartinIndra02

Copy link
Copy Markdown

AI-assisted review/test.

PASS on commit �5eeb40153431e83697ccaa212191f7b58829319.

  • Environment: Windows 11 x64, MSVC 19.44.35220, Windows SDK 10.0.26100.0, Vulkan SDK 1.4.363.1, NVIDIA GeForce RTX 3080 (driver 32.0.16.2124 / 621.24).
  • Build: cmake --build --target d3d12_boot_movie_test (Ninja, RelWithDebInfo) — succeeded cleanly with zero C4100 warnings in d3d12_boot_movie_test.cpp.
  • Test: Invoking d3d12_boot_movie_test.exe without game files cleanly outputs SKIP (no package/movie).
  • Review: Cleanly removes the unused label parameter from the present lambda and both call sites.

@Kerwinss

Copy link
Copy Markdown

Tested a5eeb40 on Windows 11 Pro 10.0.26300, MSVC 14.51 (VS Build Tools 2026), Windows SDK 10.0.26100, NVIDIA GeForce RTX 4060 / 621.24, Khronos Vulkan headers via -DLEONIDA_VULKAN_HEADERS_FETCH=ON: pass, no regression (Merged onto main 867d922 (clean), full runtime build, ctest -C RelWithDebInfo -j4: 237/239, the two failures are main's own on this GPU (d3d12_depth_resolve, #7985; d3d12_vulkan_device:6574)).

The d3d12_boot_movie_test.cpp(648,46): warning C4100: 'label': unreferenced parameter that main prints is gone. For information: the same target still prints one warning, runtime/src/vulkan_present.h(669,24): warning C4189: 'device': local variable is initialized but not referenced, from the shared header. It is already on main and isn't this PR's doing, but the target isn't warning-free yet.

AI-assisted (Claude Code). No game files.

@BeetjeMatig

Copy link
Copy Markdown

Tested a5eeb40 (head of this PR) on RTX 5070 Ti (Blackwell, subgroup 32), NVIDIA 621.01, Windows 11, MSVC 14.44 (VS 2022 17.14 Build Tools), CMake 4.5.1 + Ninja, Vulkan headers sdk-1.4.363.0 (fetched), no game copy: pass.

I applied the diff (runtime/test/d3d12_boot_movie_test.cpp only) to a clone of main at dfe4e4a and built d3d12_boot_movie_test. The build log contains no C4100. On unmodified main at dfe4e4a the same target gives "d3d12_boot_movie_test.cpp(648): warning C4100: 'label': unreferenced parameter", so the warning is gone. The test itself exits 77 ("SKIP (no package/movie)") on both, as there is no game or movie file here, so the changed lambda calls were compiled but not run.

AI-assisted (Claude Code): checked by applying the diff to a private clone of main and building and running the tests above. No game data was used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants