Fix #757 (Change message: (style) The class 'KClass' has no constructor)

http://sourceforge.net/apps/trac/cppcheck/ticket/757
This commit is contained in:
Reijo Tomperi 2009-09-29 21:27:17 +03:00
parent 88dd9846ae
commit 1b1047a5e4
3 changed files with 3 additions and 3 deletions

View File

@ -878,7 +878,7 @@ void CheckClass::thisSubtraction()
void CheckClass::noConstructorError(const Token *tok, const std::string &classname)
{
reportError(tok, Severity::style, "noConstructor", "The class '" + classname + "' has no constructor");
reportError(tok, Severity::style, "noConstructor", "The class '" + classname + "' has no constructor. Member variables not initialized.");
}
void CheckClass::uninitVarError(const Token *tok, const std::string &classname, const std::string &varname)

View File

@ -641,7 +641,7 @@ private:
"{\n"
" int i;\n"
"};\n");
ASSERT_EQUALS("[test.cpp:1]: (style) The class 'Fred' has no constructor\n", errout.str());
ASSERT_EQUALS("[test.cpp:1]: (style) The class 'Fred' has no constructor. Member variables not initialized.\n", errout.str());
}
void noConstructor2()

View File

@ -86,7 +86,7 @@ private:
"public:\n"
" int i;\n"
"};\n");
ASSERT_EQUALS("[test.cpp:1]: (style) The class 'Fred' has no constructor\n", errout.str());
ASSERT_EQUALS("[test.cpp:1]: (style) The class 'Fred' has no constructor. Member variables not initialized.\n", errout.str());
}