A function-like macro uses some of its parameters in its body but not all
What it finds
#define SCALE(x, factor) ((x) * 2): one parameter never occurs in the body, so the argument given for it is dropped, which is usually a slip in the body.
Macros that use none of their parameters, which stand in for code compiled out, are left alone.
From the rule's source, macro_parameter_unused.rs.
Turn it on, off or suppress it
The rule runs from the recommended tier up. To turn it on in a lower tier, give it a level in tx0.toml:
[rules]
"tx0/c:macro-parameter-unused" = "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:macro-parameter-unused] reason="..."tx0 explain tx0/c:macro-parameter-unused shows the same in the terminal. Found a false positive? Report it.