--no-usage-warnings flag to suppress analysis

This commit is contained in:
Vern Paxson 2022-05-05 10:57:31 -07:00 committed by Tim Wojtulewicz
parent 763b448aef
commit d9479c0502
7 changed files with 29 additions and 7 deletions

View file

@ -17,8 +17,8 @@
#include "zeek/Traverse.h"
#include "zeek/Val.h"
#include "zeek/module_util.h"
#include "zeek/script_opt/ScriptOpt.h"
#include "zeek/script_opt/StmtOptInfo.h"
#include "zeek/script_opt/UsageAnalyzer.h"
namespace zeek::detail
{
@ -658,6 +658,9 @@ void begin_func(IDPtr id, const char* module_name, FunctionFlavor flavor, bool i
id->Error("event cannot yield a value", t.get());
t->ClearYieldType(flavor);
if ( ! event_registry->Lookup(id->Name()) )
register_new_event(id);
}
std::optional<FuncType::Prototype> prototype;