checkbufferoverrun: remove dead store
the variable was declared inside a loop and the dead store also took place inside the loop (guarded by a condition) without further access of the value after that store. Found by clang analyzer. Was: lib/checkbufferoverrun.cpp:1223:17: warning: Value stored to 'tok' is never read tok = tok->next(); ^ ~~~~~~~~~~~
This commit is contained in:
parent
9ef9d0e4a8
commit
9b6d371762
|
@ -1219,8 +1219,6 @@ void CheckBufferOverrun::checkGlobalAndLocalVariable()
|
|||
} while (tok && tok->str() != ";");
|
||||
if (!tok)
|
||||
break;
|
||||
if (tok->str() == "{")
|
||||
tok = tok->next();
|
||||
arrayInfos[var->declarationId()] = ArrayInfo(&*var, symbolDatabase, var->declarationId());
|
||||
}
|
||||
if (!arrayInfos.empty())
|
||||
|
|
Loading…
Reference in New Issue