Mention the name of the variable in the inconclusive leak msg

This commit is contained in:
Raphael Geissert 2011-01-03 20:40:31 -06:00
parent e459ed1de3
commit 2b1ec9a07f
1 changed files with 1 additions and 1 deletions

View File

@ -2357,7 +2357,7 @@ void CheckMemoryLeakInFunction::checkScope(const Token *Tok1, const std::string
if (! noerr) if (! noerr)
{ {
std::ostringstream errmsg; std::ostringstream errmsg;
errmsg << "inconclusive leak: "; errmsg << "inconclusive leak of " << varname << ": ";
for (const Token *tok2 = tok; tok2; tok2 = tok2->next()) for (const Token *tok2 = tok; tok2; tok2 = tok2->next())
errmsg << " " << tok2->str(); errmsg << " " << tok2->str();
reportError(_tokenizer->tokens(), Severity::debug, "debug", errmsg.str()); reportError(_tokenizer->tokens(), Severity::debug, "debug", errmsg.str());