SA0003: Empty statements
Detects lines of code that have a semicolon (;
) but not a statement
Justification: An empty statement can be a sign for missing code.
Note: There are good reasons for using empty statements. For example, in a CASE
statement it can make sense to explicitly program out all cases, even those where there is nothing to do. When this kind of empty CASE
statement contains a comment, Static Analysis does not generate an error message.
Importance: Low
Example 16. Example
CASE value OF 1: DoSomething(); 2: ; 3: DoSomethingElse(); END_CASE
Output in the Messages view:
SA0003: Empty statements
CASE value OF 1: DoSomething(); 2: ; //nothing to do 3: DoSomethingElse(); END_CASE
Output in the Messages view:
No SA error