| 1628 | } |
| 1629 | |
| 1630 | void CheckClassImpl::memsetError(const Token *tok, const std::string &memfunc, const std::string &classname, const std::string &type, bool isContainer) |
| 1631 | { |
| 1632 | const std::string typeStr = isContainer ? std::string() : (type + " that contains a "); |
| 1633 | const std::string msg = "$symbol:" + memfunc + "\n" |
| 1634 | "$symbol:" + classname + "\n" |
| 1635 | "Using '" + memfunc + "' on " + typeStr + classname + ".\n" |
| 1636 | "Using '" + memfunc + "' on " + typeStr + classname + " is unsafe, because constructor, destructor " |
| 1637 | "and copy operator calls are omitted. These are necessary for this non-POD type to ensure that a valid object " |
| 1638 | "is created."; |
| 1639 | reportError(tok, Severity::error, "memsetClass", msg, CWE762, Certainty::normal); |
| 1640 | } |
| 1641 | |
| 1642 | void CheckClassImpl::memsetErrorReference(const Token *tok, const std::string &memfunc, const std::string &type) |
| 1643 | { |
no test coverage detected