A library function that returns a pointer to shared static storage is called

tx0/cpp:non-reentrant-functionstrictwarningmaintainability/designdepth fastsmell

What it finds

strtok, localtime, gmtime, ctime, asctime, getpwnam, gethostbyname and the like keep their result or their state in one static buffer, which the next call from anywhere overwrites; in threads, or with two uses at once, results are mixed up. The _r variants take a buffer of the caller's.

From the rule's source, non_reentrant_function.rs.

Turn it on, off or suppress it

The rule runs from the strict tier up. To turn it on in a lower tier, give it a level in tx0.toml:

tx0.toml
[rules]
"tx0/cpp:non-reentrant-function" = "warning"

To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:

// tx0: ignore[tx0/cpp:non-reentrant-function] reason="..."

tx0 explain tx0/cpp:non-reentrant-function shows the same in the terminal. Found a false positive? Report it.