From eb3b8a6cec4f63db76f8292caace7a09c60b0dd7 Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Wed, 25 May 2022 13:35:39 +0200 Subject: [PATCH] checkAlwaysTrueOrFalseStringCompare: Added '_mbscmp_l' to list of functions. --- lib/checkstring.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checkstring.cpp b/lib/checkstring.cpp index d178233bf..12a3cc25c 100644 --- a/lib/checkstring.cpp +++ b/lib/checkstring.cpp @@ -100,7 +100,7 @@ void CheckString::checkAlwaysTrueOrFalseStringCompare() return; for (const Token* tok = mTokenizer->tokens(); tok; tok = tok->next()) { - if (tok->isName() && tok->strAt(1) == "(" && 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|_mbscmp|_memicmp|_memicmp_l|_stricmp|_wcsicmp|_mbsicmp|_stricmp_l|_wcsicmp_l|_mbsicmp_l")) { + if (tok->isName() && tok->strAt(1) == "(" && 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|_mbscmp|_mbscmp_l|_memicmp|_memicmp_l|_stricmp|_wcsicmp|_mbsicmp|_stricmp_l|_wcsicmp_l|_mbsicmp_l")) { if (Token::Match(tok->tokAt(2), "%str% , %str% ,|)")) { const std::string &str1 = tok->strAt(2); const std::string &str2 = tok->strAt(4);