From a610ef9ce8ec1693027217ea073323b7439ad457 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Sun, 22 Nov 2015 11:00:36 +0100 Subject: [PATCH] fix internal warning: [lib/checkfunctions.cpp:44]: (warning) Found simple pattern inside Token::Match() call: "alloca (" --- lib/checkfunctions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checkfunctions.cpp b/lib/checkfunctions.cpp index 207737011..b7c83ae05 100644 --- a/lib/checkfunctions.cpp +++ b/lib/checkfunctions.cpp @@ -41,7 +41,7 @@ void CheckFunctions::check() for (const Token* tok = scope->classStart; tok != scope->classEnd; tok = tok->next()) { if (tok->isName() && tok->varId() == 0 && tok->strAt(1) == "(") { // alloca() is special as it depends on the code being C or C++, so it is not in Library - if (checkAlloca && Token::Match(tok, "alloca (") && (!tok->function() || tok->function()->nestedIn->type == Scope::eGlobal)) { + if (checkAlloca && Token::simpleMatch(tok, "alloca (") && (!tok->function() || tok->function()->nestedIn->type == Scope::eGlobal)) { if (_tokenizer->isC()) reportError(tok, Severity::warning, "allocaCalled", "Obsolete function 'alloca' called. In C99 and later it is recommended to use a variable length array instead.\n"