[previous] 2870 [next] Infinite loop construct with constant control expression.
Control flow

An infinite loop has been detected. Is this intended ?


/*PRQA S 2001,2015,2017,2201,3120,3323,3408,3447 ++*/
void f1(void)
{
    for (;;)                    /* 2870      */
    {
    }
}

void f2(void)
{
    while (1)                   /* 2870 2740 */
    {
    }
}

void f3(void)
{
    do                          /* 2870      */
    {
    } while (1);                /*      2740 */
}


No MISRA C:2012 Rules applicable to message 2870


See also:

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