Code that is executed but does not perform any action, or has an unintended effect, most likely results from a coding error and can cause unexpected behavior. Statements or expressions that have no effect should be identified and removed from code. Most modern compilers, in many cases, can warn about code that has no effect in many cases. (See MSC00-C. Compile cleanly at high warning levels.)
...
Tool | Version | Checker | Description | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| NO_EFFECT | Finds statements or expressions that do not accomplish anything or statements that perform an unintended action. | ||||||||||||
| noeffect | Partially implemented. | ||||||||||||
GCC | 3.0 | Options detect unused local variables or nonconstant static variables and unused function parameters, respectively. | ||||||||||||
| EFFECT |
| ||||||||||||
| 65 D | Fully implemented.Splint | ||||||||||||
PRQA QA-C |
| Splint
| Splint
| 3110 | 3112 |
| PRQA QA-CPartially implemented. | |||||||
Splint |
| PRQA
| PRQA
| 3110
|
| Partially implemented
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
Related Guidelines
...
...
Leveraging Human Experience [BRS] Unspecified Functionality [BVQ] Likely Incorrect Expressions [KOA] Dead and Deactivated Code [XYQ] | |
MISRA-C |
Rule 14.1 |
...
Rule 14.2 |
...
Bibliography
...