AutosarC++18_10-M0.1.10

Every defined function shall be called at least once

Required inputs: IR

Rationale

Functions or procedures that are not called may be symptomatic of a serious problem, such as missing paths.

Note that an unused prototype is not a violation of this rule.

See Section 3.5 for associated library issues.

Example
void f1 ( ) 
{
}
void f2 ( ) // Non-compliant
{
}
void f3 ( ); // Compliant prototype
int32_t main ( )
{
f1 ( );
return ( 0 );
}

Note

For legal reasons, this rule’s description is not part of the public documentation.