CheckSizeof: only report warnings when --enable=warning has been used
This commit is contained in:
parent
1068e095e7
commit
88e7b55a2d
|
@ -63,6 +63,8 @@ void CheckSizeof::sizeofForNumericParameterError(const Token *tok)
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
void CheckSizeof::checkSizeofForArrayParameter()
|
void CheckSizeof::checkSizeofForArrayParameter()
|
||||||
{
|
{
|
||||||
|
if (!_settings->isEnabled("warning"))
|
||||||
|
return;
|
||||||
const SymbolDatabase *symbolDatabase = _tokenizer->getSymbolDatabase();
|
const SymbolDatabase *symbolDatabase = _tokenizer->getSymbolDatabase();
|
||||||
const std::size_t functions = symbolDatabase->functionScopes.size();
|
const std::size_t functions = symbolDatabase->functionScopes.size();
|
||||||
for (std::size_t i = 0; i < functions; ++i) {
|
for (std::size_t i = 0; i < functions; ++i) {
|
||||||
|
|
Loading…
Reference in New Issue