VA_UNUSED.GENValue is never used after assignmentThe VA_UNUSED.GEN checker finds values assigned to local variables that are never used before the next assignment or the end of the function. Vulnerability and riskUnused variable values can indicate that
Vulnerable code example1 int foo(){ 2 int i; 3 i = f(); 4 i = g(); 5 return i; 6 } Klocwork flags line 3, indicating that 'i' is initialized with value returned from function f(), but the value is never used. Related checkers |