CheckOther::checkMemsetZeroBytes(): Support wmemset()
This commit is contained in:
parent
b8ca9fc844
commit
7a183779e2
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue