SA0032: Unused enumeration constantsPermalink

Detects enumeration constants that are not used in the compiled program code

Justification: Unused enumeration constants unnecessarily increase the size of the enumeration definition and can be confusing when reading the program.

PLCopen rule: CP24

Importance: Low

If multiple applications exist in a project, then only the objects below the currently active applications are affected. If there is only one application, then the objects in the common POU pool are also affected.

Example

TYPE My_Enum :
(
	one := 1, two := 2
);
END_TYPEE

--> SA0032: Unused enumeration constant 'one'
--> SA0032: Unused enumeration constant 'two'