--verbose: added more information for the variableScope error message.

This commit is contained in:
Daniel Marjamäki 2010-07-19 11:30:01 +02:00
parent c8d866b906
commit 7ef0296f97
1 changed files with 5 additions and 1 deletions

View File

@ -3961,7 +3961,11 @@ void CheckOther::charBitOpError(const Token *tok)
void CheckOther::variableScopeError(const Token *tok, const std::string &varname) void CheckOther::variableScopeError(const Token *tok, const std::string &varname)
{ {
reportError(tok, Severity::style, "variableScope", "The scope of the variable " + varname + " can be reduced"); reportError(tok,
Severity::style,
"variableScope",
"The scope of the variable " + varname + " can be reduced\n"
"Be very careful when you reduce the scope! The logical behaviour can be changed by mistake, for example when reducing the scope in a loop.");
} }
void CheckOther::conditionAlwaysTrueFalse(const Token *tok, const std::string &truefalse) void CheckOther::conditionAlwaysTrueFalse(const Token *tok, const std::string &truefalse)