![]() |
![]() |
2995 | ![]() |
||||
![]() | |||||||
| Invariant operations | |||||||
The result of this logical operation is always 'true' (1). The fact that the operation is "degenerate" suggests a logical flaw in the code. For example:
/*PRQA S 2017,2100,3120,2982,2983,2984,2986,3198,3199,3203,3227,3355,3408 ++*/
void foo(unsigned char x, int y)
{
int r;
r = x < 300; /* 2995 */
if (y < 20)
{
r = y < 30; /* 2995 */
}
}
See also:
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |