Uninitialized variables; Fixed error message, use Token::errorString

This commit is contained in:
Daniel Marjamäki 2021-05-17 16:51:30 +02:00
parent bde8b4316e
commit 84f8b7b50a
1 changed files with 2 additions and 2 deletions

View File

@ -956,9 +956,9 @@ bool CheckUninitVar::checkLoopBody(const Token *tok, const Variable& var, const
if (!suppressErrors && !bailout && errorToken) { if (!suppressErrors && !bailout && errorToken) {
if (membervar.empty()) if (membervar.empty())
uninitvarError(errorToken, errorToken->str(), alloc); uninitvarError(errorToken, errorToken->expressionString(), alloc);
else else
uninitStructMemberError(errorToken, errorToken->str() + "." + membervar); uninitStructMemberError(errorToken, errorToken->expressionString() + "." + membervar);
return true; return true;
} }