Change 'Scope of variable'-message to information message.

This commit is contained in:
Kimmo Varis 2010-12-27 12:46:18 +02:00
parent ccde32b210
commit e8b81f909d
2 changed files with 4 additions and 4 deletions

View File

@ -2626,7 +2626,7 @@ void CheckOther::charBitOpError(const Token *tok)
void CheckOther::variableScopeError(const Token *tok, const std::string &varname)
{
reportError(tok,
Severity::style,
Severity::information,
"variableScope",
"The scope of the variable " + varname + " can be reduced\n"
"The scope of the variable " + varname + " can be reduced. Warning: It can be unsafe "

View File

@ -463,7 +463,7 @@ private:
" for ( ; i < 10; ++i) ;\n"
" }\n"
"}\n");
ASSERT_EQUALS("[test.cpp:3]: (style) The scope of the variable i can be reduced\n", errout.str());
ASSERT_EQUALS("[test.cpp:3]: (information) The scope of the variable i can be reduced\n", errout.str());
varScope("void f(int x)\n"
"{\n"
@ -473,7 +473,7 @@ private:
" for ( ; i < 10; ++i) ;\n"
" }\n"
"}\n");
ASSERT_EQUALS("[test.cpp:3]: (style) The scope of the variable i can be reduced\n", errout.str());
ASSERT_EQUALS("[test.cpp:3]: (information) The scope of the variable i can be reduced\n", errout.str());
}
void varScope6()
@ -539,7 +539,7 @@ private:
" edgeResistance = (edge+1) / 2.0;\n"
" }\n"
"}\n");
ASSERT_EQUALS("[test.cpp:2]: (style) The scope of the variable edgeResistance can be reduced\n", errout.str());
ASSERT_EQUALS("[test.cpp:2]: (information) The scope of the variable edgeResistance can be reduced\n", errout.str());
}
void varScope9()