diff --git a/src/script_opt/ZAM/Stmt.cc b/src/script_opt/ZAM/Stmt.cc index 4753717d94..d353827b68 100644 --- a/src/script_opt/ZAM/Stmt.cc +++ b/src/script_opt/ZAM/Stmt.cc @@ -591,7 +591,7 @@ const ZAMStmt ZAMCompiler::TypeSwitch(const SwitchStmt* sw, const NameExpr* v, c int ntypes = type_map->size(); auto aux = new ZInstAux(ntypes); - for ( auto i = 0; i < type_map->size(); ++i ) { + for ( size_t i = 0; i < type_map->size(); ++i ) { auto& tm = (*type_map)[i]; auto id_i = tm.first; auto id_case = tm.second; diff --git a/src/script_opt/ZAM/ZOp.h b/src/script_opt/ZAM/ZOp.h index 72ae94ddd3..09e44f145d 100644 --- a/src/script_opt/ZAM/ZOp.h +++ b/src/script_opt/ZAM/ZOp.h @@ -5,6 +5,7 @@ #pragma once #include +#include namespace zeek::detail {