mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 12:08:20 +00:00
EventHandler: Deprecate SetUsed() and Used() as well.
Seems the latter isn't used outside of the functions that were deprecated in the previous commit and with UsageAnalyzer not making use of this information unclear why we should keep it around. Relates to #3187.
This commit is contained in:
parent
398122206e
commit
ff34a4aa7f
5 changed files with 35 additions and 2 deletions
|
@ -402,7 +402,10 @@ NameExpr::NameExpr(IDPtr arg_id, bool const_init) : Expr(EXPR_NAME), id(std::mov
|
|||
|
||||
EventHandler* h = event_registry->Lookup(id->Name());
|
||||
if ( h )
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
h->SetUsed();
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
// This isn't in-lined to avoid needing to pull in ID.h.
|
||||
|
@ -4265,7 +4268,10 @@ EventExpr::EventExpr(const char* arg_name, ListExprPtr arg_args)
|
|||
event_registry->Register(h, true);
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
h->SetUsed();
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
handler = h;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue