From 910a2f6c5945c2da3073748ed797f778b079e364 Mon Sep 17 00:00:00 2001 From: Vern Paxson Date: Fri, 9 Aug 2024 09:27:59 -0700 Subject: [PATCH] address some script optimization compiler warnings under Linux --- src/script_opt/ZAM/Stmt.cc | 2 +- src/script_opt/ZAM/ZOp.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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 {