parent
27459761c9
commit
865a252c89
|
@ -1682,7 +1682,7 @@ bool CheckUninitVar::isVariableUsage(const Token *vartok, bool pointer, bool all
|
||||||
}
|
}
|
||||||
parent = parent->astParent();
|
parent = parent->astParent();
|
||||||
}
|
}
|
||||||
if(!assignment)
|
if (!assignment)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3459,7 +3459,7 @@ private:
|
||||||
" struct AB *ab = malloc(sizeof(struct AB));\n"
|
" struct AB *ab = malloc(sizeof(struct AB));\n"
|
||||||
" return ab->a;\n"
|
" return ab->a;\n"
|
||||||
"}");
|
"}");
|
||||||
ASSERT_EQUALS( "[test.cpp:4]: (error) Memory is allocated but not initialized: ab\n"
|
ASSERT_EQUALS("[test.cpp:4]: (error) Memory is allocated but not initialized: ab\n"
|
||||||
"[test.cpp:4]: (error) Uninitialized struct member: ab.a\n",
|
"[test.cpp:4]: (error) Uninitialized struct member: ab.a\n",
|
||||||
errout.str());
|
errout.str());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue