CS.LA_UNUSED
Unused label.
The LA_UNUSED checker finds unused labels.
Vulnerable code example
9 using System; 10 using System.Security; 11 using System.Security.Permissions; 12 13 namespace TransparencyWarningsDemo 14 { 15 16 public class TransparentMethodsUseSecurityAssertsClass 17 { 18 public void test() 19 { 20 if(a) goto c; 21 a=10; 22 goto c; 23 a: 24 return x; 25 c: 26 return 0; 27 } 28 } 29 }
Klocwork flags that label 'a' is not used.