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

@ -86,9 +86,8 @@ void CPPCompile::GenAttrs(const AttributesPtr& attrs)
AddInit(attrs);
for ( auto i = 0; i < avec.size(); ++i )
for ( const auto& attr : avec )
{
const auto& attr = avec[i];
const auto& e = attr->GetExpr();
if ( ! e )
@ -171,7 +170,7 @@ const char* CPPCompile::AttrName(const AttrPtr& attr)
case ATTR_IS_ASSIGNED: return "ATTR_IS_ASSIGNED";
case ATTR_IS_USED: return "ATTR_IS_USED";
case NUM_ATTRS: return "<busted>";
default: return "<busted>";
}
}