mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 16:48:19 +00:00
Remove unused variable assignments, dead code.
This commit is contained in:
parent
9c2a3124e0
commit
e4e7c78925
5 changed files with 4 additions and 11 deletions
|
@ -207,7 +207,6 @@ char* CompositeHash::SingleValHash(int type_check, char* kp0,
|
||||||
unsigned int* kp = AlignAndPadType<unsigned int>(kp0);
|
unsigned int* kp = AlignAndPadType<unsigned int>(kp0);
|
||||||
VectorVal* vv = v->AsVectorVal();
|
VectorVal* vv = v->AsVectorVal();
|
||||||
VectorType* vt = v->Type()->AsVectorType();
|
VectorType* vt = v->Type()->AsVectorType();
|
||||||
vector<Val*>* indices = v->AsVector();
|
|
||||||
*kp = vv->Size();
|
*kp = vv->Size();
|
||||||
kp1 = reinterpret_cast<char*>(kp+1);
|
kp1 = reinterpret_cast<char*>(kp+1);
|
||||||
for ( unsigned int i = 0; i < vv->Size(); ++i )
|
for ( unsigned int i = 0; i < vv->Size(); ++i )
|
||||||
|
|
|
@ -194,8 +194,7 @@ static void parse_function_name(vector<ParseLocationRec>& result,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
FuncType* ftype;
|
if ( ! id->Type()->AsFuncType() )
|
||||||
if ( ! (ftype = id->Type()->AsFuncType()) )
|
|
||||||
{
|
{
|
||||||
debug_msg("Function %s not declared.\n", id->Name());
|
debug_msg("Function %s not declared.\n", id->Name());
|
||||||
plr.type = plrUnknown;
|
plr.type = plrUnknown;
|
||||||
|
|
|
@ -400,8 +400,6 @@ bool PersistenceSerializer::RunSerialization(SerialStatus* status)
|
||||||
|
|
||||||
while ( (id = status->ids->NextEntry(status->id_cookie)) )
|
while ( (id = status->ids->NextEntry(status->id_cookie)) )
|
||||||
{
|
{
|
||||||
ID* g = global_scope()->Lookup(id->Name());
|
|
||||||
|
|
||||||
if ( ! DoIDSerialization(status, id) )
|
if ( ! DoIDSerialization(status, id) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
|
@ -1218,9 +1218,8 @@ Val* ForStmt::DoExec(Frame* f, Val* v, stmt_flow_type& flow) const
|
||||||
const PDict(TableEntryVal)* loop_vals = tv->AsTable();
|
const PDict(TableEntryVal)* loop_vals = tv->AsTable();
|
||||||
|
|
||||||
HashKey* k;
|
HashKey* k;
|
||||||
TableEntryVal* iter_val;
|
|
||||||
IterCookie* c = loop_vals->InitForIteration();
|
IterCookie* c = loop_vals->InitForIteration();
|
||||||
while ( (iter_val = loop_vals->NextEntry(k, c)) )
|
while ( loop_vals->NextEntry(k, c) )
|
||||||
{
|
{
|
||||||
ListVal* ind_lv = tv->RecoverIndex(k);
|
ListVal* ind_lv = tv->RecoverIndex(k);
|
||||||
delete k;
|
delete k;
|
||||||
|
|
|
@ -1656,8 +1656,7 @@ int TableVal::RemoveFrom(Val* val) const
|
||||||
IterCookie* c = tbl->InitForIteration();
|
IterCookie* c = tbl->InitForIteration();
|
||||||
|
|
||||||
HashKey* k;
|
HashKey* k;
|
||||||
TableEntryVal* v;
|
while ( tbl->NextEntry(k, c) )
|
||||||
while ( (v = tbl->NextEntry(k, c)) )
|
|
||||||
{
|
{
|
||||||
Val* index = RecoverIndex(k);
|
Val* index = RecoverIndex(k);
|
||||||
|
|
||||||
|
@ -1955,8 +1954,7 @@ ListVal* TableVal::ConvertToList(TypeTag t) const
|
||||||
IterCookie* c = tbl->InitForIteration();
|
IterCookie* c = tbl->InitForIteration();
|
||||||
|
|
||||||
HashKey* k;
|
HashKey* k;
|
||||||
TableEntryVal* v;
|
while ( tbl->NextEntry(k, c) )
|
||||||
while ( (v = tbl->NextEntry(k, c)) )
|
|
||||||
{
|
{
|
||||||
ListVal* index = table_hash->RecoverVals(k);
|
ListVal* index = table_hash->RecoverVals(k);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue