CheckFunctions::checkProhibitedFunctions(): don't warn about alloca when --enable=warning is not given.

This commit is contained in:
Matthias Krüger 2015-11-25 22:05:51 +01:00
parent 35b270ddcc
commit 87ce88d6ab
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ namespace {
void CheckFunctions::checkProhibitedFunctions()
{
const bool checkAlloca = (_settings->standards.c >= Standards::C99 && _tokenizer->isC()) || _settings->standards.cpp >= Standards::CPP11;
const bool checkAlloca = _settings->isEnabled("warning") && ((_settings->standards.c >= Standards::C99 && _tokenizer->isC()) || _settings->standards.cpp >= Standards::CPP11);
const SymbolDatabase *symbolDatabase = _tokenizer->getSymbolDatabase();
for (unsigned int i = 0; i < symbolDatabase->functionScopes.size(); i++) {