VA_UNUSED.INITValue is never used after initializationThe VA_UNUSED.INIT checker finds values assigned to local variables in initialization 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 = f(); 3 4 i = g(); 5 return i; 6 } Klocwork flags line 2, indicating that 'i' is initialized with the value returned from function f(), but the value is never used. Related checkers |