Cppcheck
|
Using obsolete functions that are always insecure to use. More...
#include <checkobsolescentfunctions.h>
Public Member Functions | |
CheckObsoleteFunctions () | |
This constructor is used when registering the CheckObsoleteFunctions. | |
CheckObsoleteFunctions (const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) | |
This constructor is used when running checks. | |
void | runSimplifiedChecks (const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) |
run checks, the token list is simplified | |
void | obsoleteFunctions () |
Check for obsolete functions. | |
![]() | |
Check (const std::string &aname) | |
This constructor is used when registering the CheckClass. | |
Check (const std::string &aname, const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) | |
This constructor is used when running checks. | |
virtual | ~Check () |
virtual void | runChecks (const Tokenizer *, const Settings *, ErrorLogger *) |
run checks, the token list is not simplified | |
virtual void | getErrorMessages (ErrorLogger *errorLogger, const Settings *settings) const =0 |
get error messages | |
const std::string & | name () const |
class name, used to generate documentation | |
virtual std::string | classInfo () const =0 |
get information about this class, used to generate documentation | |
bool | inconclusiveFlag () const |
virtual FileInfo * | getFileInfo (const Tokenizer *tokenizer, const Settings *settings) const |
virtual void | analyseWholeProgram (const std::list< FileInfo * > &fileInfo, const Settings &settings, ErrorLogger &errorLogger) |
Private Member Functions | |
void | getErrorMessages (ErrorLogger *errorLogger, const Settings *settings) const |
std::string | classInfo () const |
Static Private Member Functions | |
static void | initObsoleteFunctions () |
init obsolete functions list ' | |
static std::string | myName () |
Static Private Attributes | |
static std::map< std::string, std::string > | _obsoleteStandardFunctions |
static std::map< std::string, std::string > | _obsoletePosixFunctions |
static std::map< std::string, std::string > | _obsoleteC99Functions |
Additional Inherited Members | |
![]() | |
static std::list< Check * > & | instances () |
List of registered check classes. | |
static void | reportError (const ErrorLogger::ErrorMessage &errmsg) |
Write given error to errorlogger or to out stream in xml format. | |
![]() | |
template<typename T , typename U > | |
void | reportError (const Token *tok, const Severity::SeverityType severity, const T id, const U msg) |
report an error | |
template<typename T , typename U > | |
void | reportError (const Token *tok, const Severity::SeverityType severity, const T id, const U msg, unsigned int cwe, bool inconclusive) |
report an error | |
template<typename T , typename U > | |
void | reportError (const std::list< const Token * > &callstack, Severity::SeverityType severity, const T id, const U msg) |
report an error | |
template<typename T , typename U > | |
void | reportError (const std::list< const Token * > &callstack, Severity::SeverityType severity, const T id, const U msg, unsigned int cwe, bool inconclusive) |
report an error | |
![]() | |
const Tokenizer *const | _tokenizer |
const Settings *const | _settings |
ErrorLogger *const | _errorLogger |
Using obsolete functions that are always insecure to use.
Definition at line 38 of file checkobsolescentfunctions.h.
|
inline |
This constructor is used when registering the CheckObsoleteFunctions.
Definition at line 41 of file checkobsolescentfunctions.h.
|
inline |
This constructor is used when running checks.
Definition at line 46 of file checkobsolescentfunctions.h.
|
inlineprivate |
Definition at line 139 of file checkobsolescentfunctions.h.
|
inlineprivate |
Definition at line 124 of file checkobsolescentfunctions.h.
References Check::reportError(), and Severity::style.
|
inlinestaticprivate |
init obsolete functions list '
Definition at line 65 of file checkobsolescentfunctions.h.
|
inlinestaticprivate |
Definition at line 135 of file checkobsolescentfunctions.h.
void CheckObsoleteFunctions::obsoleteFunctions | ( | ) |
Check for obsolete functions.
Definition at line 38 of file checkobsolescentfunctions.cpp.
References _obsoleteC99Functions, _obsoletePosixFunctions, _obsoleteStandardFunctions, Check::_settings, Check::_tokenizer, Standards::c, Standards::C99, Scope::classEnd, Scope::classStart, SymbolDatabase::functionScopes, Tokenizer::getSymbolDatabase(), Tokenizer::isCPP(), Settings::isEnabled(), Token::Match(), Token::next(), Standards::posix, Check::reportError(), Token::simpleMatch(), Settings::standards, and Severity::style.
Referenced by runSimplifiedChecks().
|
inlinevirtual |
run checks, the token list is simplified
Implements Check.
Definition at line 50 of file checkobsolescentfunctions.h.
References obsoleteFunctions().
|
staticprivate |
Definition at line 62 of file checkobsolescentfunctions.h.
Referenced by obsoleteFunctions().
|
staticprivate |
Definition at line 61 of file checkobsolescentfunctions.h.
Referenced by obsoleteFunctions().
|
staticprivate |
Definition at line 60 of file checkobsolescentfunctions.h.
Referenced by obsoleteFunctions().