uninitialized variables: run always

This commit is contained in:
Daniel Marjamäki 2009-01-21 19:11:27 +00:00
parent afb3bf1011
commit 5fa9fce8d4
2 changed files with 2 additions and 2 deletions

View File

@ -389,7 +389,7 @@ void CheckClass::constructors()
if (! constructor_token) if (! constructor_token)
{ {
// If "--style" has been given, give a warning // If "--style" has been given, give a warning
if (_settings._checkCodingStyle) if (ErrorMessage::noConstructor(_settings))
{ {
// If the class has member variables there should be an constructor // If the class has member variables there should be an constructor
struct VAR *varlist = ClassChecking_GetVarList(tok1); struct VAR *varlist = ClassChecking_GetVarList(tok1);

View File

@ -271,7 +271,7 @@ void CppCheck::checkFile(const std::string &code, const char FileName[])
checkMemoryLeak.CheckMemoryLeak(); checkMemoryLeak.CheckMemoryLeak();
// Check that all class constructors are ok. // Check that all class constructors are ok.
if (ErrorMessage::noConstructor(_settings) && ErrorMessage::uninitVar()) if (ErrorMessage::noConstructor(_settings) || ErrorMessage::uninitVar())
checkClass.constructors(); checkClass.constructors();
// Check that all base classes have virtual destructors // Check that all base classes have virtual destructors