[previous] 3232 [next] File scope static, '%s', is never modified. It could be declared const.
Declarations and Definitions

This object is being defined with internal linkage and an initialiser. Its value is never modified and therefore it might be appropriate to declare it as 'const'.

For example:


/*PRQA S 2017,3120,3218,3227,3408 ++*/

static int ax = 10;                             /* Message 3232 */

extern int foo(int n)
{
    int r;

    r = n * ax;

    return r;
}

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