SA0003: Empty statements
Function | Determines lines of code containing a semicolon (;) but no statement. |
Reason | An empty statement can be an indication of missing code. |
Exception | Although there are meaningful uses for empty statements. For example, it may be useful to explicitly program all cases in a CASE statement, including cases in which no action is required. If such an empty CASE statement is commented, the statistical code analysis does not generate an error message. |
Importance | Low |
Samples:
; // => SA0003
(* comment *); // => SA0003
nVar; // => SA0003The following sample generates the error "SA0003: Empty statement" for State 2.
CASE nVar OF
1: DoSomething();
2: ;
3: DoSomethingElse();
END_CASEThe following sample does not generate an SA0003 error.
CASE nVar OF
1: DoSomething();
2: ; // nothing to do
3: DoSomethingElse();
END_CASE