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

Method returnValueNotUsedError

lib/checkmemoryleak.cpp:1206–1209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1204}
1205
1206void CheckMemoryLeakNoVarImpl::returnValueNotUsedError(const Token *tok, const std::string &alloc)
1207{
1208 reportError(tok, Severity::error, "leakReturnValNotUsed", "$symbol:" + alloc + "\nReturn value of allocation function '$symbol' is not stored.", CWE771, Certainty::normal);
1209}
1210
1211void CheckMemoryLeakNoVarImpl::unsafeArgAllocError(const Token *tok, const std::string &funcName, const std::string &ptrType, const std::string& objType)
1212{

Callers 1

getErrorMessagesMethod · 0.80

Calls 1

reportErrorFunction · 0.70

Tested by

no test coverage detected