mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
--no-usage-warnings flag to suppress analysis
This commit is contained in:
parent
763b448aef
commit
d9479c0502
7 changed files with 29 additions and 7 deletions
|
@ -14,6 +14,7 @@
|
|||
#include "zeek/script_opt/Inline.h"
|
||||
#include "zeek/script_opt/ProfileFunc.h"
|
||||
#include "zeek/script_opt/Reduce.h"
|
||||
#include "zeek/script_opt/UsageAnalyzer.h"
|
||||
#include "zeek/script_opt/UseDefs.h"
|
||||
#include "zeek/script_opt/ZAM/Compile.h"
|
||||
|
||||
|
@ -519,7 +520,7 @@ static void analyze_scripts_for_ZAM(std::unique_ptr<ProfileFuncs>& pfs)
|
|||
finalize_functions(funcs);
|
||||
}
|
||||
|
||||
void analyze_scripts()
|
||||
void analyze_scripts(bool no_usage_warnings)
|
||||
{
|
||||
static bool did_init = false;
|
||||
|
||||
|
@ -529,6 +530,10 @@ void analyze_scripts()
|
|||
did_init = true;
|
||||
}
|
||||
|
||||
std::unique_ptr<UsageAnalyzer> ua;
|
||||
if ( ! no_usage_warnings )
|
||||
ua = std::make_unique<UsageAnalyzer>(funcs);
|
||||
|
||||
auto& ofuncs = analysis_options.only_funcs;
|
||||
auto& ofiles = analysis_options.only_files;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue