MISRA Discussion Forums

Full Version: Clarification of rule 2.3 and 2.4
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The rules deals with unused tag and unused type declaration.

My query is whether the unused tag and unused types declared in "header" file are also violation of this rule. Example below to explain more:

content of test.h:

int16_t unusedtype (void)
{
typedef int16_t local_type;
return 67;
}

This header is included in test.c. Should the violations be reported on this.
The "local_type" declaration will still violate rule 2.3 if it is declared in a header file.