FaultDetection-RemovableStatements

There shall be no statements that could be removed because they do not contribute to a function’s result

Required inputs: IR, StaticSemanticAnalysis

This check detects statements which can be removed because they do not contribute to a function's result (unused assignments and transitively detected code that would only be useful for such unused assignments).

Possible Messages

Key

Text

Severity

Disabled

removable_declaration

Declaration can be removed

None

False

removable_statement

Statement can be removed

None

False

Options

allow_void_var

allow_void_var : bool = True

Whether a cast of "var" to "void" (e.g. (void)var;) should be allowed or reported.