Fix issue found by Coverity, scope cant be null since scope is dereferenced on all paths before the while and also unconditionally inside while
This commit is contained in:
parent
462ae455c8
commit
32422c815b
|
@ -3690,7 +3690,7 @@ const Enumerator * SymbolDatabase::findEnumerator(const Token * tok) const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
while (scope && scope->nestedIn) {
|
while (scope->nestedIn) {
|
||||||
if (scope->type == Scope::eFunction && scope->functionOf)
|
if (scope->type == Scope::eFunction && scope->functionOf)
|
||||||
scope = scope->functionOf;
|
scope = scope->functionOf;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue