AUTOSAR C++14 Rule A0-1-6
There should be no unused type declarations
Description
Rule Definition
There should be no unused type declarations.
Rationale
If you declare a type but do not use it, determining if the type is redundant or left unused by mistake is difficult when you review your code.
For example, if you declare an enumerated data type to store some specialized data, but then use an integer type to store the data, the unused type can indicate a coding error.
Polyspace Implementation
Polyspace® reports a violation of this rule if your code contains unused local types.
As an exception, Polyspace does not report a violation if you define the unused type with
public
access in a template class.
Troubleshooting
If you expect a rule violation but Polyspace does not report it, see Diagnose Why Coding Standard Violations Do Not Appear as Expected.
Examples
Check Information
Group: Language Independent Issues |
Category: Advisory, Automated |