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();
|
CheckBufferOverrun();
|
||||||
|
|
||||||
|
|
||||||
// Check that all private functions are called.
|
|
||||||
// Temporarily inactivated to avoid any false positives
|
|
||||||
CheckUnusedPrivateFunctions();
|
|
||||||
|
|
||||||
|
|
||||||
// Warnings
|
// Warnings
|
||||||
if (ShowWarnings)
|
if (ShowWarnings)
|
||||||
{
|
{
|
||||||
|
// Check that all private functions are called.
|
||||||
|
CheckUnusedPrivateFunctions();
|
||||||
|
|
||||||
// Found implementation in header
|
// Found implementation in header
|
||||||
WarningHeaderWithImplementation();
|
WarningHeaderWithImplementation();
|
||||||
|
|
||||||
|
@ -118,10 +117,6 @@ static void CppCheck(const char FileName[])
|
||||||
// Check that all class constructors are ok.
|
// Check that all class constructors are ok.
|
||||||
// Temporarily inactivated to avoid any false positives
|
// Temporarily inactivated to avoid any false positives
|
||||||
//CheckConstructors();
|
//CheckConstructors();
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// if (a) delete a;
|
// if (a) delete a;
|
||||||
WarningRedundantCode();
|
WarningRedundantCode();
|
||||||
|
@ -129,15 +124,17 @@ static void CppCheck(const char FileName[])
|
||||||
// if (condition);
|
// if (condition);
|
||||||
WarningIf();
|
WarningIf();
|
||||||
|
|
||||||
|
// Dangerous usage of strtok
|
||||||
|
WarningStrTok();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Dangerous functions, such as 'gets' and 'scanf'
|
// Dangerous functions, such as 'gets' and 'scanf'
|
||||||
WarningDangerousFunctions();
|
WarningDangerousFunctions();
|
||||||
|
|
||||||
// Invalid function usage..
|
// Invalid function usage..
|
||||||
InvalidFunctionUsage();
|
InvalidFunctionUsage();
|
||||||
|
|
||||||
// Dangerous usage of strtok
|
|
||||||
WarningStrTok();
|
|
||||||
|
|
||||||
// Clean up tokens..
|
// Clean up tokens..
|
||||||
DeallocateTokens();
|
DeallocateTokens();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue