mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +00:00
Fix various compiler/linter warnings in script_opt/CPP code
This commit is contained in:
parent
e200016200
commit
3e85375010
15 changed files with 43 additions and 41 deletions
|
@ -483,7 +483,7 @@ void ProfileFuncs::MergeInProfile(ProfileFunc* pf)
|
|||
(void) HashType(t->AsTypeType()->GetType());
|
||||
|
||||
auto& init_exprs = g->GetInitExprs();
|
||||
for ( auto i_e : init_exprs )
|
||||
for ( const auto& i_e : init_exprs )
|
||||
if ( i_e )
|
||||
{
|
||||
pending_exprs.push_back(i_e.get());
|
||||
|
@ -550,7 +550,7 @@ void ProfileFuncs::TraverseValue(const ValPtr& v)
|
|||
auto r = cast_intrusive<RecordVal>(v);
|
||||
auto n = r->NumFields();
|
||||
|
||||
for ( auto i = 0; i < n; ++i )
|
||||
for ( auto i = 0u; i < n; ++i )
|
||||
TraverseValue(r->GetField(i));
|
||||
}
|
||||
break;
|
||||
|
@ -583,7 +583,7 @@ void ProfileFuncs::TraverseValue(const ValPtr& v)
|
|||
auto vv = cast_intrusive<VectorVal>(v);
|
||||
auto n = vv->Size();
|
||||
|
||||
for ( auto i = 0; i < n; ++i )
|
||||
for ( auto i = 0u; i < n; ++i )
|
||||
TraverseValue(vv->ValAt(i));
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue