Fix gcc warning; variable vidx is assigned but not read

This commit is contained in:
Daniel Marjamäki 2021-01-16 18:12:51 +01:00
parent 7aa85aa408
commit 853c271f22
1 changed files with 0 additions and 2 deletions

View File

@ -887,11 +887,9 @@ void CheckBufferOverrun::objectIndex()
const Token *idx = tok->astOperand2();
if (!idx || !obj)
continue;
const ValueFlow::Value* vidx = nullptr;
if (idx->hasKnownIntValue()) {
if (idx->getKnownIntValue() == 0)
continue;
vidx = &idx->values().front();
}
if (idx->hasKnownIntValue() && idx->getKnownIntValue() == 0)
continue;