MISRAC2012-Rule-2.5
In this section:
Synopsis
(Advisory) A project should not contain unused macro declarations.
Enabled by default
No
Severity/Certainty
Low/Medium

Full description
An unused macro declaration was found.
This is a link analysis check.
Coding standards
- MISRA C:2012 Rule-2.5
(Advisory) A project should not contain unused macro declarations
Code examples
The following code example fails the check and will give a warning:
#define M(x) (x + 1)
void example(void) {
/* not invoking M */
}
The following code example passes the check and will not give a warning about this issue:
#define M(x) (x + 1)
void example(void) {
/* invoking M */
int x = M(1);
}