![]() |
![]() |
3422 | ![]() |
||||
![]() | |||||||
| Redundancy | |||||||
This statement contains a redundant operation. What was the intention ? For example:
/*PRQA S 489,506,2017,3199,3203,3227,3401,3408,3416,3440,3447,3602 ++*/
extern int f1(void);
extern void foo(int x, int *p)
{
int r;
x == f1(); /* Message 3422 - equality operation is redundant */
x + *(p++); /* Message 3422 - addition and dereference operations are redundant */
(long)(r = x ); /* Message 3423 - cast is redundant */
x == *p; /* Message 3112 - all operations are redundant - statement has no side effect */
*p++; /* Message 3404 - dereference operation is redundant */
(*p)++; /* OK */
}
See also:
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |