MISRAC++2023-0.2.4 (C++ only)
In this section:
Synopsis
(Advisory) Functions with limited visibility should be used at least once
Enabled by default
No
Severity/Certainty
Low/Medium

Full description
Found unused function
This is a link analysis check.
Coding standards
This check does not correspond to any coding standard rules.
Code examples
The following code example fails the check and will give a warning:
namespace {
void example(){} // No used
}
void main() {
}
The following code example passes the check and will not give a warning about this issue:
namespace {
void example(){} // No used
// Exception, tagged maybe_unused
[[maybe_unused]] void debuglog(char*);
}
void use_ex() {
example();
}