A local variable is declared register

tx0/c:register-storagestrictwarningstyle

What it finds

register int i;: compilers choose registers on their own, so the keyword only forbids taking the variable's address. Variables bound to a register with asm are left alone.

From the rule's source, register_storage.rs.

Example from the rule's tests
int f(int n){  register int i = n;tx0 reports: register has no effect but to forbid taking the address  return i;}
Highlighted lines are the ones tx0 reports, with its message under each; the other lines are left alone.

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/c:register-storage" = "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/c:register-storage] reason="..."

tx0 explain tx0/c:register-storage shows the same in the terminal. Found a false positive? Report it.