[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:2004 Rules applicable to message 3219:

Rule  14.1  (Required) There shall be no unreachable code.


See also:

QA·C Source Code Analyser 8.1
MISRA-C:2004 Compliance Module 3.2
© 2012 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index | MISRA-C:2004 Rule Index Contents