Fix various compiler/linter warnings in script_opt/CPP code

This commit is contained in:
Jon Siwek 2021-05-03 18:14:41 -07:00 committed by Vern Paxson
parent e200016200
commit 3e85375010
15 changed files with 43 additions and 41 deletions

View file

@ -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;