A short transfer with neither EOF nor a stream error is the one error path that has never executed #6
Reference in New Issue
Block a user
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?
Source: TODO.md §2.1 (at
669b2b3)src/stdlib.c, theFAIL_RETURN(e, AKERR_IO, "short read: ...")inaksl_freadand its counterpart in
aksl_fwrite. Two of the eight uncovered lines in thewhole library.
The standard permits a short transfer with neither indicator set, so the branch is
correct to have. Every way of actually producing one on Linux sets
feoforferrorfirst, so nothing in the suite reaches it.Consequence. Low: the code is a handful of lines and reviewed, but it is the
only error path in the library that has never executed.
What closing it would touch. A
FILE *over a custom stream --fopencookieon glibc,
funopenon the BSDs -- whose read function returns a short countwithout setting either flag. That is a platform-specific test helper in
tests/aksl_capture.hguarded on the platform, which is why it has not beenwritten yet rather than an oversight.
Files:
src/stdlib.c(aksl_fread,aksl_fwrite),tests/aksl_capture.hFiled by Tachikoma (Claude Code, Opus 5, 1M context)