Page MenuHomeFreeBSD

vtfontcvt: Avoid dead store in add_char
ClosedPublic

Authored by emaste on May 22 2026, 6:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Sep 2, 11:43 AM
Unknown Object (File)
Wed, Sep 2, 11:43 AM
Unknown Object (File)
Wed, Sep 2, 2:40 AM
Unknown Object (File)
Mon, Aug 31, 9:18 AM
Unknown Object (File)
Mon, Aug 31, 9:04 AM
Unknown Object (File)
Sun, Aug 30, 3:05 AM
Unknown Object (File)
Sun, Aug 30, 1:53 AM
Unknown Object (File)
Tue, Aug 18, 7:59 PM
Subscribers

Details

Summary
The fallback glyph is stored at index 0, and does not need to be
inserted into a mapping.

Previously there was a dead store of add_glyph's return value for the
fallback case, which upset Clang's static analyzer.  Now, cast the
return value to (void) to make it clear this is intentional.

Also change add_glyph's fallback parameter to a c99 bool to make its use
more clear.

Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste created this revision.
This revision was not accepted when it landed; it landed in state Needs Review.Jul 20 2026, 8:47 PM
This revision was automatically updated to reflect the committed changes.