uninitialized variables: run always
This commit is contained in:
parent
afb3bf1011
commit
5fa9fce8d4
|
@ -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);
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue