make it non-fatal for optimized scripts to encounter an empty "for" body

This commit is contained in:
Vern Paxson 2022-09-16 09:38:31 -07:00
parent ee28609e74
commit 02cd773c51

View file

@ -624,7 +624,7 @@ StmtPtr ForStmt::DoReduce(Reducer* c)
body = body->Reduce(c);
if ( body->Tag() == STMT_NULL )
Error("empty \"for\" body leaves loop variables in indeterminant state");
Warn("empty \"for\" body leaves loop variables in indeterminant state");
if ( red_e_stmt )
return TransformMe(make_intrusive<StmtList>(red_e_stmt, this), c);