fix one of the TODO testcases added for #3094 (Buffer access out-of-bounds in struct variable)
This commit is contained in:
parent
65b1a4df19
commit
812a17f294
|
@ -1579,8 +1579,8 @@ void CheckBufferOverrun::checkStructVariable()
|
|||
if (Token::Match(tok3->next(), "%var% ;"))
|
||||
varname[0] = tok3->strAt(1);
|
||||
|
||||
// Declare pointer: Fred *fred1
|
||||
else if (Token::Match(tok3->next(), "* %var% [,);=]"))
|
||||
// Declare pointer or reference: Fred *fred1
|
||||
else if (Token::Match(tok3->next(), "*|& %var% [,);=]"))
|
||||
varname[0] = tok3->strAt(2);
|
||||
|
||||
else
|
||||
|
|
|
@ -1769,7 +1769,7 @@ private:
|
|||
"{\n"
|
||||
" strcpy( abc.str, \"abcdef\" );\n"
|
||||
"}\n");
|
||||
TODO_ASSERT_EQUALS("[test.cpp:8]: (error) Buffer access out-of-bounds: abc.str\n", "", errout.str());
|
||||
ASSERT_EQUALS("[test.cpp:8]: (error) Buffer access out-of-bounds: abc.str\n", errout.str());
|
||||
|
||||
check("static void f()\n"
|
||||
"{\n"
|
||||
|
|
Loading…
Reference in New Issue