Fixed crash, simplified code in testassert.cpp
This commit is contained in:
parent
6545bf7938
commit
c3577bc8dd
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue