| 259 | } |
| 260 | |
| 261 | std::list<CTU::FileInfo::UnsafeUsage> CTU::loadUnsafeUsageListFromXml(const tinyxml2::XMLElement *xmlElement) |
| 262 | { |
| 263 | std::list<CTU::FileInfo::UnsafeUsage> ret; |
| 264 | for (const tinyxml2::XMLElement *e = xmlElement->FirstChildElement(); e; e = e->NextSiblingElement()) { |
| 265 | if (std::strcmp(e->Name(), "unsafe-usage") != 0) |
| 266 | continue; |
| 267 | bool error = false; |
| 268 | FileInfo::UnsafeUsage unsafeUsage; |
| 269 | unsafeUsage.myId = readAttrString(e, ATTR_MY_ID, &error); |
| 270 | unsafeUsage.myArgNr = readAttrInt(e, ATTR_MY_ARGNR, &error); |
| 271 | unsafeUsage.myArgumentName = readAttrString(e, ATTR_MY_ARGNAME, &error); |
| 272 | unsafeUsage.location.fileName = readAttrString(e, ATTR_LOC_FILENAME, &error); |
| 273 | unsafeUsage.location.lineNumber = readAttrInt(e, ATTR_LOC_LINENR, &error); |
| 274 | unsafeUsage.location.column = readAttrInt(e, ATTR_LOC_COLUMN, &error); |
| 275 | unsafeUsage.value = readAttrInt(e, ATTR_VALUE, &error); |
| 276 | |
| 277 | if (!error) |
| 278 | ret.push_back(std::move(unsafeUsage)); |
| 279 | } |
| 280 | return ret; |
| 281 | } |
| 282 | |
| 283 | static int isCallFunction(const Scope *scope, int argnr, const Token *&tok) |
| 284 | { |
nothing calls this directly
no test coverage detected