mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +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
|
@ -107,6 +107,7 @@ void usage(const char* prog, int code)
|
|||
fprintf(stderr, " -s|--rulefile <rulefile> | read rules from given file\n");
|
||||
fprintf(stderr, " -t|--tracefile <tracefile> | activate execution tracing\n");
|
||||
fprintf(stderr, " -u|--usage-issues | find variable usage issues and exit\n");
|
||||
fprintf(stderr, " --no-usage-warnings | suppress warnings of unused functions/hooks/events\n");
|
||||
fprintf(stderr, " -v|--version | print version and exit\n");
|
||||
fprintf(stderr, " -w|--writefile <writefile> | write to given tcpdump file\n");
|
||||
#ifdef DEBUG
|
||||
|
@ -367,6 +368,7 @@ Options parse_cmdline(int argc, char** argv)
|
|||
}
|
||||
|
||||
int profile_scripts = 0;
|
||||
int no_usage_warnings = 0;
|
||||
|
||||
struct option long_opts[] = {
|
||||
{"parse-only", no_argument, nullptr, 'a'},
|
||||
|
@ -410,6 +412,7 @@ Options parse_cmdline(int argc, char** argv)
|
|||
#endif
|
||||
|
||||
{"profile-scripts", optional_argument, &profile_scripts, 1},
|
||||
{"no-usage-warnings", no_argument, &no_usage_warnings, 1},
|
||||
{"pseudo-realtime", optional_argument, nullptr, '~'},
|
||||
{"jobs", optional_argument, nullptr, 'j'},
|
||||
{"test", no_argument, nullptr, '#'},
|
||||
|
@ -613,6 +616,9 @@ Options parse_cmdline(int argc, char** argv)
|
|||
activate_script_profiling(optarg);
|
||||
profile_scripts = 0;
|
||||
}
|
||||
|
||||
if ( no_usage_warnings )
|
||||
rval.no_usage_warnings = true;
|
||||
break;
|
||||
|
||||
case '?':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue