Test aksl_vscanf, and drop a check that could not fail
Coverage caught both. aksl_vscanf was declared, documented and never called by anything, which is what 100% function coverage is for -- it is the only metric here that notices a whole function nobody exercises. aksl_vasprintf had a second vsnprintf whose return it compared against the first, and a CLEANUP block to free the buffer when they disagreed. They cannot disagree: the buffer was sized by vsnprintf from the same format string and the same arguments a few lines earlier. So that was a failure branch nothing can reach and a free() beneath it that nothing can execute -- exactly the dead code TODO.md 2.2.11 recorded against the old aksl_memset and aksl_memcpy, and removing those was the point. The invariant is a comment now, where it can be read. Back to 99.5% of lines (1708/1716) and 100% of functions (154/154), with the eight uncovered lines the ones TODO.md already accounts for. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -92,8 +92,8 @@ jobs:
|
||||
# there is no lcov/gcovr to install here.
|
||||
#
|
||||
# The gate is a ratchet, not a target. Across all four sources the suite
|
||||
# covers 99.5% of lines (1643/1651), 46.0% of branches and 100% of
|
||||
# functions (147/147), so 90/40 fails on a real regression -- a test
|
||||
# covers 99.5% of lines (1708/1716), 46.0% of branches and 100% of
|
||||
# functions (154/154), so 90/40 fails on a real regression -- a test
|
||||
# deleted, or new untested code added -- without tripping over rounding.
|
||||
# The report is printed either way; the uncovered lines it lists are the
|
||||
# missing tests.
|
||||
|
||||
Reference in New Issue
Block a user