Change 'Scope of variable'-message to information message.
This commit is contained in:
parent
ccde32b210
commit
e8b81f909d
|
@ -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 "
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue