Commit a1e9ea0
fix: test_hle_bios + clang-tidy noise from PR #126 first-run
CI on PR #126 (the m68k_done / GPUDone leak fix) surfaced two
issues:
1. ASAN sanitizers job still reported the same 1.5MB + 256B leak
the PR set out to fix. Root cause: test/test_hle_bios.c calls
p_retro_load_game twice (NTSC then PAL) but only calls
p_retro_unload_game ONCE (between the two loads). The PAL load
never gets unloaded -- so JaguarDone() (which now does
m68k_done() + GPUDone()) is never called for the second load.
Added the missing p_retro_unload_game() before the final
p_retro_deinit() at the end of main.
2. clang-tidy fired NEW pre-existing findings on src/core/jaguar.c
and test/test_hle_bios.c because both are in this PR's diff (the
workflow runs clang-tidy on changed files, not changed lines):
- bugprone-incorrect-roundings on USEC_TO_RISC_CYCLES /
USEC_TO_M68K_CYCLES in src/core/event.h. Idiom is
`(double + 0.5)` integer cast; lround() is C99 and we're
C89/GNU89.
- bugprone-multi-level-implicit-pointer-conversion on
test_hle_bios.c's dlsym() patterns.
Both added to the disabled list in .clang-tidy with
documented rationale.
Co-Authored-By: Claude Opus 4.7 <[email protected]>1 parent 6476059 commit a1e9ea0
2 files changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
52 | 61 | | |
53 | 62 | | |
54 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3172 | 3172 | | |
3173 | 3173 | | |
3174 | 3174 | | |
| 3175 | + | |
3175 | 3176 | | |
3176 | 3177 | | |
3177 | 3178 | | |
| |||
0 commit comments