[previous] 2466 [next] The value of this controlling expression is always 'false'. The contained code is unreachable.
Miscellaneous

The 2nd expression in this for loop statement always evaluates to zero so the loop will never be executed and the contained code is unreachable. Is this intended ?

Message 2466 is now considered an obsolete message. Its function has been superseded by message 2994.

For example:


/*PRQA S 1-9999 ++*/
/*PRQA S 2466, 2880, 2994, 2996 --*/

extern void foo(void)
{
    int j;

    for (j = 10; j < 10; j++)   /* Message 2466 + 2994 and 2996 */
    {
      foo ();                   /* Message 2880 */
    }
}


No MISRA-C:2004 Rules applicable to message 2466


See also:

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