![]() |
![]() |
2982 | ![]() |
||||
![]() | |||||||
| Redundancy | |||||||
This assignment appears to be redundant because the value of the object is not used before it is modified again. For example:
/*PRQA S 2017,3198,3408,3447 ++*/
extern int bar(int n);
int foo(void)
{
int x;
x = 0; /* 2982 */
x = bar(1);
return x;
}
MISRA C:2012 Rules applicable to message 2982:
| Rule-2.2 (Required) | There shall be no dead code |
![]() | ||
| QA·C Source Code Analyser 8.1
MISRA C:2012 Compliance Module 1.0 © 2012 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | MISRA C:2012 Rule Index | Contents |