LA_UNUSED
Unused label
The LA_UNUSED checker finds unused labels.
Vulnerable code example
Copy
int func(int a, int x)
{
if(a)
goto label2;
a = 10;
goto label2;
label1:
return x;
label2:
return 0;
}
Klocwork flags line 9 to indicate that the label 'label1' is not used.