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())
|
if (!var || !var->isArgument() || !var->isClass() || !var->isConst() || var->isPointer() || var->isArray() || var->isReference())
|
||||||
continue;
|
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)
|
continue; // references could not be used as va_start parameters (#5824)
|
||||||
|
|
||||||
const Token* const tok = var->typeStartToken();
|
const Token* const tok = var->typeStartToken();
|
||||||
|
|
|
@ -35,10 +35,7 @@ private:
|
||||||
errout.str("");
|
errout.str("");
|
||||||
|
|
||||||
Settings settings;
|
Settings settings;
|
||||||
settings.addEnabled("style");
|
|
||||||
settings.addEnabled("warning");
|
settings.addEnabled("warning");
|
||||||
settings.addEnabled("portability");
|
|
||||||
settings.addEnabled("performance");
|
|
||||||
|
|
||||||
// Tokenize..
|
// Tokenize..
|
||||||
Tokenizer tokenizer(&settings, this);
|
Tokenizer tokenizer(&settings, this);
|
||||||
|
|
Loading…
Reference in New Issue