From 7ef0296f9753d7f07dcc1012b406f5d25993cd09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Mon, 19 Jul 2010 11:30:01 +0200 Subject: [PATCH] --verbose: added more information for the variableScope error message. --- lib/checkother.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/checkother.cpp b/lib/checkother.cpp index c1a0f30b7..ad36087a2 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -3961,7 +3961,11 @@ void CheckOther::charBitOpError(const Token *tok) 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)