[previous] 2211 [next] '%s' is not aligned with the previously declared identifier.
Bracing and Indentation

The declaration of this identifier is not aligned at the same column position as the previous declaration.

Message 2211 is only generated on declarations at block scope. It provides a way of identifying untidy declarations which do not align identifiers consistently in the same column position. Notice that although the unary indirection operator '*' is often applied immediately alongside an identifier, it does not become part of the identifier; it is preferable to separate it from the identifier with whitespace.

For example:


/*PRQA S 553,2017,3205,3210,3211,3408,3447 ++*/

extern void foo(void)
{
    int     a;
    int    b;                   /* Message 2211 */
    int    c;
    int     d;                  /* Message 2211 */
    int      e;                 /* Message 2211 */
    int      f;
    int      *g;                /* Message 2211 */
    int       h;
    int       i, j;             /* Message 2211 */
    int          k;
}

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