Main: More checks are only done when the '-w' flag is given.
This commit is contained in:
parent
7801d262a2
commit
bc70635e10
19
main.cpp
19
main.cpp
|
@ -93,14 +93,13 @@ static void CppCheck(const char FileName[])
|
|||
CheckBufferOverrun();
|
||||
|
||||
|
||||
// Check that all private functions are called.
|
||||
// Temporarily inactivated to avoid any false positives
|
||||
CheckUnusedPrivateFunctions();
|
||||
|
||||
|
||||
// Warnings
|
||||
if (ShowWarnings)
|
||||
{
|
||||
// Check that all private functions are called.
|
||||
CheckUnusedPrivateFunctions();
|
||||
|
||||
// Found implementation in header
|
||||
WarningHeaderWithImplementation();
|
||||
|
||||
|
@ -118,10 +117,6 @@ static void CppCheck(const char FileName[])
|
|||
// Check that all class constructors are ok.
|
||||
// Temporarily inactivated to avoid any false positives
|
||||
//CheckConstructors();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// if (a) delete a;
|
||||
WarningRedundantCode();
|
||||
|
@ -129,15 +124,17 @@ static void CppCheck(const char FileName[])
|
|||
// if (condition);
|
||||
WarningIf();
|
||||
|
||||
// Dangerous usage of strtok
|
||||
WarningStrTok();
|
||||
}
|
||||
|
||||
|
||||
// Dangerous functions, such as 'gets' and 'scanf'
|
||||
WarningDangerousFunctions();
|
||||
|
||||
// Invalid function usage..
|
||||
InvalidFunctionUsage();
|
||||
|
||||
// Dangerous usage of strtok
|
||||
WarningStrTok();
|
||||
|
||||
// Clean up tokens..
|
||||
DeallocateTokens();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue