| 136 | } |
| 137 | |
| 138 | void CheckLeakAutoVarImpl::configurationInfo(const Token* tok, const std::pair<const Token*, VarInfo::Usage>& functionUsage) |
| 139 | { |
| 140 | if (mSettings.checkLibrary && functionUsage.second == VarInfo::USED && |
| 141 | (!functionUsage.first || !functionUsage.first->function() || !functionUsage.first->function()->hasBody())) { |
| 142 | std::string funcStr = functionUsage.first ? mSettings.library.getFunctionName(functionUsage.first) : "f"; |
| 143 | if (funcStr.empty()) |
| 144 | funcStr = "unknown::" + functionUsage.first->str(); |
| 145 | reportError(tok, |
| 146 | Severity::information, |
| 147 | "checkLibraryUseIgnore", |
| 148 | "--check-library: Function " + funcStr + "() should have <use>/<leak-ignore> configuration"); |
| 149 | } |
| 150 | } |
| 151 | |
| 152 | void CheckLeakAutoVarImpl::doubleFreeError(const Token *tok, const Token *prevFreeTok, const std::string &varname, int type) |
| 153 | { |
no test coverage detected