main: test_native_astc_texture_count does not compile on Windows (scanf is deprecated in the CRT; from #2288) #2396
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot#2396
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hookshot version
main
696d85b0(every main sincefd16f15b, 2026-11-11 17:00 UTC), from sourceWhat kind of problem
Something else
What happened
tests/test_native_astc_texture_count.py, the test that came with my #2288, does not compile on Windows, so the game-free checks fail there (Python source checks (windows-2022, part 1/2): 179 passed, 1 failed, 13 skipped):The fixture is compiled with
-Wall -Wextra -Werrorand reads its cases withstd::scanf; with clang and the Windows CRT's headers that is a deprecation, and so an error. On Linux it passes with g++ and clang++, which is all I had run. #2288's own workflows never ran before the merge (they waited for an approval), so it first showed on a later pull request's run (#2289, this job).Only the test's fixture is affected, not the game.
Where in the game
Not in the game:
tests/run_all.pyon WindowsHow often
Every time
Graphics card and driver version
Does not depend on it
CPU, RAM and operating system
GitHub's windows-2022 runner (clang++ with the Windows SDK's headers); it passes on Arch Linux with g++ 16.2.1 and clang++ 23.1.3
Changes from the defaults
None
Other software hooked into the game
No, nothing hooked in
hookshot_log.txt
Not a game run. The job's log is linked above.
Claim
I'm working on this: one line in the test's fixture (
_CRT_SECURE_NO_WARNINGSahead of its includes, as the other test sources that use these functions have it), and its pull request follows this issue directly. Bydocs/workflow.md: S2 (main's checks are red on Windows for everyone) x reach (every contributor's run) x confidence: the cause is the compiler's own message; the fix is proven only when the pull request's Windows job passes, which I will confirm there.