RETVOID.GENNon-void function returns void valueThe RETVOID.GEN checker finds instances in which a non-void function has an explicit return statement with no value. Vulnerability and riskIf the returned value is used, it can cause the use of uninitialized memory. Vulnerable code example1 #include <math.h> 2 #include <stdio.h> 3 #define OK 1 4 int func () 5 { 6 return; 7 } Klocwork flags line 6 in this code, in which the int function func() has a return statement with no value. Related checkersExternal guidance |