mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Stmt: Deprecate STMT_ANY
This isn't used in-tree and has been misused by some external plugins of mine (zeekjs and zeek-perf-support) for their own Stmt subclasses. These plugins should be updated to use the new STMT_EXTERN statement. Handle STMT_ANY explicitly in stmt_name() for the time being to fix #3529 until we remove STMT_ANY for good.
This commit is contained in:
parent
a5c941139c
commit
4019e9917a
2 changed files with 7 additions and 1 deletions
|
@ -55,6 +55,12 @@ const char* stmt_name(StmtTag t) {
|
|||
"extern",
|
||||
};
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
if ( int(t) == STMT_ANY )
|
||||
return "any";
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
return stmt_names[int(t)];
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace zeek::detail {
|
|||
|
||||
// These are in a separate file to break circular dependences
|
||||
enum StmtTag {
|
||||
STMT_ANY = -1,
|
||||
STMT_ANY [[deprecated("Remove in v7.1 - Unused and plugins should use STMT_EXTERN.")]] = -1,
|
||||
STMT_ALARM, // Does no longer exist but kept to create enums consistent.
|
||||
STMT_PRINT,
|
||||
STMT_EVENT,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue