MISRAC2004-18.1
In this section:
Synopsis
(Required) All structure and union types shall be complete at the end of the translation unit.
Enabled by default
Yes
Severity/Certainty
Low/Medium

Full description
Structs and unions were found that are used without being defined.
Coding standards
- MISRA C:2004 18.1
(Required) All structure and union types shall be complete at the end of the translation unit.
Code examples
The following code example fails the check and will give a warning:
struct incomplete;
void example(struct incomplete *p)
{
}
The following code example passes the check and will not give a warning about this issue:
struct complete {
int x;
};
void example(struct complete *p)
{
}