[previous] 4112 [next] Left hand operand of relational operator is a 'Boolean' expression.
Arithmetic type - Operands REFERENCE - ISO:C90-6.3.8 Relational Operators

The left hand operand of this relational operator is an expression which is effectively Boolean. This is bad practice at best and probably a mistake.

For example:


/*PRQA S 2017,3204,3227,3408 ++*/

int foo(int a, int b, int c, int d)
{
    int x;

    x = (a > b) > (c + d);                      /* Message 4112 */

    return x;
}

QA·C Source Code Analyser 8.1.2
© 2013 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index Contents