MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / returnImplicitIntError

Method returnImplicitIntError

lib/symboldatabase.cpp:3863–3874  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3861}
3862
3863void SymbolDatabase::returnImplicitIntError(const Token *tok) const
3864{
3865 if (tok && mSettings.severity.isEnabled(Severity::portability) && (tok->isC() && mSettings.standards.c != Standards::C89)) {
3866 const std::list<const Token*> locationList(1, tok);
3867 const ErrorMessage errmsg(locationList, &mTokenizer.list,
3868 Severity::portability,
3869 "returnImplicitInt",
3870 "Omitted return type of function '" + tok->str() + "' defaults to int, this is not supported by ISO C99 and later standards.",
3871 Certainty::normal);
3872 mErrorLogger.reportErr(errmsg);
3873 }
3874}
3875
3876const Function* Type::getFunction(const std::string& funcName) const
3877{

Callers

nothing calls this directly

Calls 4

isCMethod · 0.80
isEnabledMethod · 0.45
strMethod · 0.45
reportErrMethod · 0.45

Tested by

no test coverage detected