[previous] 3219 [next] Static function '%s()' is not used within this translation unit.
Redundancy

A function defined with the 'static' storage-class specifier specifier has internal linkage and therefore cannot be called from outside its own translation unit. This particular function is not called from anywhere within the existing translation.unit either, and so it is currently unreachable and therefore redundant.

For example:


/*PRQA S 553,2017,3408,3447,3450 ++*/

static int g;                           /* Message 3207 */


static void foo(void)                   /* Message 3219 */
{
}


MISRA C:2012 Rules applicable to message 3219:

Rule-2.1  (Required) A project shall not contain unreachable code


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