Fixed #1209 (False positive: uninitialized variable c when it is initialized with 'ab(sizeof(xyz), &c)')
This commit is contained in:
parent
bcafb30d0d
commit
d82079e86f
|
@ -1660,7 +1660,7 @@ private:
|
|||
|
||||
else if (Token::simpleMatch(tok2, "sizeof ("))
|
||||
{
|
||||
tok2 = tok2->link();
|
||||
tok2 = tok2->next()->link();
|
||||
if (!tok2)
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1148,6 +1148,14 @@ private:
|
|||
"}\n");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
checkUninitVar("void f()\n"
|
||||
"{\n"
|
||||
" int c;\n"
|
||||
" ab(sizeof(xyz), &c);\n"
|
||||
" if (c);\n"
|
||||
"}\n");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
// goto..
|
||||
checkUninitVar("void foo(int x)\n"
|
||||
"{\n"
|
||||
|
|
Loading…
Reference in New Issue