From 02cd773c518e1d2f83c179be226a7587efdb59a6 Mon Sep 17 00:00:00 2001 From: Vern Paxson Date: Fri, 16 Sep 2022 09:38:31 -0700 Subject: [PATCH] make it non-fatal for optimized scripts to encounter an empty "for" body --- src/script_opt/Stmt.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script_opt/Stmt.cc b/src/script_opt/Stmt.cc index 58521849d1..2e01d66002 100644 --- a/src/script_opt/Stmt.cc +++ b/src/script_opt/Stmt.cc @@ -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(red_e_stmt, this), c);