CheckString::checkAlwaysTrueOrFalseStringCompare: Added support for string compare more functions.

This commit is contained in:
Martin Ettl 2015-01-02 13:12:42 +01:00
parent 465f74b3bb
commit 8f4f3ca063
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ void CheckString::checkAlwaysTrueOrFalseStringCompare()
return; return;
for (const Token* tok = _tokenizer->tokens(); tok; tok = tok->next()) { for (const Token* tok = _tokenizer->tokens(); tok; tok = tok->next()) {
if (Token::Match(tok, "memcmp|strncmp|strcmp|stricmp|strverscmp|bcmp|strcmpi|strcasecmp|strncasecmp|wcsncasecmp|wcscasecmp|wmemcmp|wcscmp|wcsncmp (")) { if (Token::Match(tok, "memcmp|strncmp|strcmp|stricmp|strverscmp|bcmp|strcmpi|strcasecmp|strncasecmp|strncasecmp_l|strcasecmp_l|wcsncasecmp|wcscasecmp|wmemcmp|wcscmp|wcscasecmp_l|wcsncasecmp_l|wcsncmp (")) {
if (Token::Match(tok->tokAt(2), "%str% , %str%")) { if (Token::Match(tok->tokAt(2), "%str% , %str%")) {
const std::string &str1 = tok->strAt(2); const std::string &str1 = tok->strAt(2);
const std::string &str2 = tok->strAt(4); const std::string &str2 = tok->strAt(4);