CheckOther::checkMemsetZeroBytes(): Support wmemset()

This commit is contained in:
PKEuS 2016-07-16 21:53:25 +02:00
parent b8ca9fc844
commit 7a183779e2
1 changed files with 1 additions and 1 deletions

View File

@ -1089,7 +1089,7 @@ void CheckOther::checkMemsetZeroBytes()
for (std::size_t i = 0; i < functions; ++i) {
const Scope * scope = symbolDatabase->functionScopes[i];
for (const Token* tok = scope->classStart->next(); tok != scope->classEnd; tok = tok->next()) {
if (Token::simpleMatch(tok, "memset (") && (numberOfArguments(tok)==3)) {
if (Token::Match(tok, "memset|wmemset (") && (numberOfArguments(tok)==3)) {
const Token* lastParamTok = tok->next()->link()->previous();
if (lastParamTok->str() == "0")
memsetZeroBytesError(tok);