[previous] 3220 [next] Identifier declared at a nested level of block scope.
Declarations and Definitions

An ordinary identifier has been declared at a nested level of block scope inside a function. Some coding standards require that all identifiers should be declared either at file scope or at the first level of block scope.

For example:


/*PRQA S 2017,2211,2213,2216,3199,3203,3204,3205,3227,3408 ++*/

extern void foo ( int a )
{
    if (a > 0)
    {
        typedef unsigned char UC;               /* Message 3220 */
        int x = 0;                              /* Message 3220 */
        struct ST {int m; int n;} stx;          /* Message 3220 */

        stx.m = x;
    }
}

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