| 198 | } |
| 199 | |
| 200 | void CheckStringImpl::suspiciousStringCompareError(const Token* tok, const std::string& var, bool isLong) |
| 201 | { |
| 202 | const std::string cmpFunc = isLong ? "wcscmp" : "strcmp"; |
| 203 | reportError(tok, Severity::warning, "literalWithCharPtrCompare", |
| 204 | "$symbol:" + var + "\nString literal compared with variable '$symbol'. Did you intend to use " + cmpFunc + "() instead?", CWE595, Certainty::normal); |
| 205 | } |
| 206 | |
| 207 | void CheckStringImpl::suspiciousStringCompareError_char(const Token* tok, const std::string& var) |
| 208 | { |
no test coverage detected