mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 14:08:20 +00:00
EventRegistry: Deprecate UsedHandlers() and UnusedHandlers()
and check_for_unused_event_handlers: UsageAnalyzer is more thorough and the previous ones weren't extended to work with &is_used and should probably be considered superseded by the UsageAnalyzer even if that currently does not provide a public API and just prints out deprecation warnings. I'm also tempted to deprecate SetUsed() and Used() of EventHandler for the same reason. Closes #3187.
This commit is contained in:
parent
cd24acdfc8
commit
398122206e
5 changed files with 8 additions and 4 deletions
|
@ -1008,7 +1008,10 @@ SetupResult setup(int argc, char** argv, Options* zopts) {
|
|||
if ( zeek_init )
|
||||
event_mgr.Enqueue(zeek_init, Args{});
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
EventRegistry::string_list dead_handlers = event_registry->UnusedHandlers();
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
if ( ! dead_handlers.empty() && check_for_unused_event_handlers ) {
|
||||
for ( const string& handler : dead_handlers )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue