diff --git a/lib/checkother.cpp b/lib/checkother.cpp index 45274bb2d..609c634a0 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -1976,7 +1976,7 @@ void CheckOther::checkConstantFunctionParameter() if (!var || !var->isArgument() || !var->isClass() || !var->isConst() || var->isPointer() || var->isArray() || var->isReference()) continue; - if (var->scope()->function->arg->link()->strAt(-1) == ".") + if (var->scope() && var->scope()->function->arg->link()->strAt(-1) == ".") continue; // references could not be used as va_start parameters (#5824) const Token* const tok = var->typeStartToken(); diff --git a/test/testassert.cpp b/test/testassert.cpp index d4ce144a7..a28733645 100644 --- a/test/testassert.cpp +++ b/test/testassert.cpp @@ -35,10 +35,7 @@ private: errout.str(""); Settings settings; - settings.addEnabled("style"); settings.addEnabled("warning"); - settings.addEnabled("portability"); - settings.addEnabled("performance"); // Tokenize.. Tokenizer tokenizer(&settings, this);