Skip to main content

IAR Embedded Workbench for RH850 3.20.x

MISRAC2012-Rule-2.4

In this section:
Synopsis

(Advisory) A project should not contain unused tag declarations.

Enabled by default

No

Severity/Certainty

Low/Low

lowlow.png
Full description

Unused tag declarations were found.

This is a link analysis check.

Coding standards
MISRA C:2012 Rule-2.4

(Advisory) A project should not contain unused tag declarations

Code examples

The following code example fails the check and will give a warning:

struct abc {
  int x;
};

void foo(void) {
  /* not using abc */
}

The following code example passes the check and will not give a warning about this issue:

struct def {
  int x;
};

void foo(void) {
  struct def m;
}