quick fix for #1969 (False positive: Uninitialized variable when exit() is called before variable is used.)
This commit is contained in:
parent
0597c50a47
commit
02088443f9
|
@ -304,6 +304,13 @@ static void checkExecutionPaths_(const Token *tok, std::list<ExecutionPath *> &c
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// might be a noreturn function..
|
||||||
|
if (Token::Match(tok->previous(), "[;{}] %var% ( ) ; }") && tok->varId() == 0)
|
||||||
|
{
|
||||||
|
ExecutionPath::bailOut(checks);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// don't parse into "struct type { .."
|
// don't parse into "struct type { .."
|
||||||
if (Token::Match(tok, "struct|union|class %type% {|:"))
|
if (Token::Match(tok, "struct|union|class %type% {|:"))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue