[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 */
}

See also:

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