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

Method isnullargbad

lib/library.cpp:1238–1249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1236}
1237
1238bool Library::isnullargbad(const Token *ftok, int argnr) const
1239{
1240 const ArgumentChecks *arg = getarg(ftok, argnr);
1241 if (!arg) {
1242 // scan format string argument should not be null
1243 const std::string funcname = getFunctionName(ftok);
1244 const auto it = utils::as_const(mData->mFunctions).find(funcname);
1245 if (it != mData->mFunctions.cend() && it->second.formatstr && it->second.formatstr_scan)
1246 return true;
1247 }
1248 return arg && arg->notnull;
1249}
1250
1251bool Library::isuninitargbad(const Token *ftok, int argnr, int indirect, bool *hasIndirect) const
1252{

Callers 6

parseFunctionCallMethod · 0.80
isFunctionParUsageMethod · 0.80
getFunctionUsageFunction · 0.80

Calls 1

findMethod · 0.45

Tested by 1