![]() |
![]() |
3112 | ![]() |
||||
![]() | |||||||
| Redundancy | |||||||
This statement has no side effects and so it is useless, Perhaps there is a mistake here ? For example:
/*PRQA S 2017,3204,3227,3408 ++*/
void foo(int x)
{
int n = 0;
n == x; /* Message 3112 */
}
MISRA-C:2004 Rules applicable to message 3112:
| Rule 14.2 (Required) | All non-null statements shall either (i) have at least one side effect however executed, or (ii) cause control flow to change. |
![]() | ||
| QA·C Source Code Analyser 8.1
MISRA-C:2004 Compliance Module 3.2 © 2012 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | MISRA-C:2004 Rule Index | Contents |