Fixed #1720 (segmentation fault of cppcheck)
This commit is contained in:
parent
5789eb116d
commit
cb43168d81
|
@ -523,6 +523,7 @@ void Variables::alias(unsigned int varid1, unsigned int varid2)
|
|||
{
|
||||
VariableUsage *temp = find(*i);
|
||||
|
||||
if (temp)
|
||||
temp->_aliases.erase(var1->_name->varId());
|
||||
}
|
||||
|
||||
|
|
|
@ -1147,8 +1147,7 @@ private:
|
|||
|
||||
void localvar17() // ticket #1720
|
||||
{
|
||||
// FIXME: Don't crash when checking the code below!
|
||||
/*
|
||||
// Don't crash when checking the code below!
|
||||
functionVariableUsage("void foo()\n"
|
||||
"{\n"
|
||||
" struct DATA *data;\n"
|
||||
|
@ -1160,7 +1159,7 @@ private:
|
|||
" data->info = k;\n"
|
||||
" line_start = ptr;\n"
|
||||
"}\n");
|
||||
*/
|
||||
ASSERT_EQUALS("[test.cpp:6]: (style) Variable 'line_start' is assigned a value that is never used\n", errout.str());
|
||||
}
|
||||
|
||||
void localvaralias1()
|
||||
|
|
Loading…
Reference in New Issue