mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Disable some deprecation diagnostics for GCC
Clang automatically disables deprecation warnings for types used within already-deprecated contexts, such as if you use a deprecated type inside of a method that's beeen marked as deprecated. GCC doesn't have this feature so it spews a lot more warnings. These functions are now wrapped in pragmas that disable the warnings for the usage.
This commit is contained in:
parent
137e416a03
commit
149e3b3c32
19 changed files with 275 additions and 135 deletions
|
@ -530,11 +530,6 @@ std::list<std::pair<::zeek::plugin::HookType, int> > Manager::HooksEnabledForPlu
|
|||
return enabled;
|
||||
}
|
||||
|
||||
void Manager::EnableHook(::plugin::HookType hook, Plugin* plugin, int prio)
|
||||
{
|
||||
EnableHook(static_cast<zeek::plugin::HookType>(hook), plugin, prio);
|
||||
}
|
||||
|
||||
void Manager::EnableHook(zeek::plugin::HookType hook, Plugin* plugin, int prio)
|
||||
{
|
||||
if ( ! hooks[hook] )
|
||||
|
@ -553,11 +548,6 @@ void Manager::EnableHook(zeek::plugin::HookType hook, Plugin* plugin, int prio)
|
|||
l->sort(hook_cmp);
|
||||
}
|
||||
|
||||
void Manager::DisableHook(::plugin::HookType hook, Plugin* plugin)
|
||||
{
|
||||
DisableHook(static_cast<zeek::plugin::HookType>(hook), plugin);
|
||||
}
|
||||
|
||||
void Manager::DisableHook(zeek::plugin::HookType hook, Plugin* plugin)
|
||||
{
|
||||
hook_list* l = hooks[hook];
|
||||
|
@ -581,6 +571,19 @@ void Manager::DisableHook(zeek::plugin::HookType hook, Plugin* plugin)
|
|||
}
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
void Manager::EnableHook(::plugin::HookType hook, Plugin* plugin, int prio)
|
||||
{
|
||||
EnableHook(static_cast<zeek::plugin::HookType>(hook), plugin, prio);
|
||||
}
|
||||
|
||||
void Manager::DisableHook(::plugin::HookType hook, Plugin* plugin)
|
||||
{
|
||||
DisableHook(static_cast<zeek::plugin::HookType>(hook), plugin);
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
void Manager::RequestEvent(EventHandlerPtr handler, Plugin* plugin)
|
||||
{
|
||||
DBG_LOG(DBG_PLUGINS, "Plugin %s requested event %s",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue