Void function returns value
The VOIDRET checker finds functions declared as void that return a value.
Vulnerability and risk
This issue is typically style-related, but may indicate a logic problem in the code.
Vulnerable code example
1 class A{
2 void foo();
3 };
4 void A::foo()
5 {
6 return 0;
7 }
Klocwork flags line 6, in which a value is returned from void function foo().