mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 08:38:20 +00:00
Merge branch 'noreturn' of https://github.com/MaxKellermann/zeek
Minor formatting change in merge so [[noreturn]] is consistently on same line as function declarations. * 'noreturn' of https://github.com/MaxKellermann/zeek: threading/MsgThread: add [[noreturn]] to InternalError() Flare: add [[noreturn]] to bad_pipe_op() Obj: add [[noreturn]] attributes to Internal(), bad_ref() Reporter: add [[noreturn]] attribute to several methods
This commit is contained in:
commit
3996a54302
6 changed files with 18 additions and 8 deletions
10
CHANGES
10
CHANGES
|
@ -1,4 +1,14 @@
|
||||||
|
|
||||||
|
3.2.0-dev.85 | 2020-02-21 15:29:45 -0800
|
||||||
|
|
||||||
|
* threading/MsgThread: add [[noreturn]] to InternalError() (Max Kellermann)
|
||||||
|
|
||||||
|
* Flare: add [[noreturn]] to bad_pipe_op() (Max Kellermann)
|
||||||
|
|
||||||
|
* Obj: add [[noreturn]] attributes to Internal(), bad_ref() (Max Kellermann)
|
||||||
|
|
||||||
|
* Reporter: add [[noreturn]] attribute to several methods (Max Kellermann)
|
||||||
|
|
||||||
3.2.0-dev.80 | 2020-02-21 10:14:05 -0800
|
3.2.0-dev.80 | 2020-02-21 10:14:05 -0800
|
||||||
|
|
||||||
* OpaqueVal: remove misplaced `virtual` keywords (Max Kellermann)
|
* OpaqueVal: remove misplaced `virtual` keywords (Max Kellermann)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
3.2.0-dev.80
|
3.2.0-dev.85
|
||||||
|
|
|
@ -13,7 +13,7 @@ Flare::Flare()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void bad_pipe_op(const char* which, bool signal_safe)
|
[[noreturn]] static void bad_pipe_op(const char* which, bool signal_safe)
|
||||||
{
|
{
|
||||||
if ( signal_safe )
|
if ( signal_safe )
|
||||||
abort();
|
abort();
|
||||||
|
|
|
@ -93,7 +93,7 @@ public:
|
||||||
BadTag(text, tag_to_text_func(t1), tag_to_text_func(t2)); \
|
BadTag(text, tag_to_text_func(t1), tag_to_text_func(t2)); \
|
||||||
}
|
}
|
||||||
|
|
||||||
void Internal(const char* msg) const;
|
[[noreturn]] void Internal(const char* msg) const;
|
||||||
void InternalWarning(const char* msg) const;
|
void InternalWarning(const char* msg) const;
|
||||||
|
|
||||||
virtual void Describe(ODesc* d) const { /* FIXME: Add code */ };
|
virtual void Describe(ODesc* d) const { /* FIXME: Add code */ };
|
||||||
|
@ -152,7 +152,7 @@ private:
|
||||||
// Prints obj to stderr, primarily for debugging.
|
// Prints obj to stderr, primarily for debugging.
|
||||||
extern void print(const BroObj* obj);
|
extern void print(const BroObj* obj);
|
||||||
|
|
||||||
extern void bad_ref(int type);
|
[[noreturn]] extern void bad_ref(int type);
|
||||||
|
|
||||||
// Sometimes useful when dealing with BroObj subclasses that have their
|
// Sometimes useful when dealing with BroObj subclasses that have their
|
||||||
// own (protected) versions of Error.
|
// own (protected) versions of Error.
|
||||||
|
|
|
@ -66,11 +66,11 @@ public:
|
||||||
|
|
||||||
// Report a fatal error. Bro will terminate after the message has been
|
// Report a fatal error. Bro will terminate after the message has been
|
||||||
// reported.
|
// reported.
|
||||||
void FatalError(const char* fmt, ...) FMT_ATTR;
|
[[noreturn]] void FatalError(const char* fmt, ...) FMT_ATTR;
|
||||||
|
|
||||||
// Report a fatal error. Bro will terminate after the message has been
|
// Report a fatal error. Bro will terminate after the message has been
|
||||||
// reported and always generate a core dump.
|
// reported and always generate a core dump.
|
||||||
void FatalErrorWithCore(const char* fmt, ...) FMT_ATTR;
|
[[noreturn]] void FatalErrorWithCore(const char* fmt, ...) FMT_ATTR;
|
||||||
|
|
||||||
// Report a runtime error in evaluating a Bro script expression. This
|
// Report a runtime error in evaluating a Bro script expression. This
|
||||||
// function will not return but raise an InterpreterException.
|
// function will not return but raise an InterpreterException.
|
||||||
|
@ -97,7 +97,7 @@ public:
|
||||||
|
|
||||||
// Report an internal program error. Bro will terminate with a core
|
// Report an internal program error. Bro will terminate with a core
|
||||||
// dump after the message has been reported.
|
// dump after the message has been reported.
|
||||||
void InternalError(const char* fmt, ...) FMT_ATTR;
|
[[noreturn]] void InternalError(const char* fmt, ...) FMT_ATTR;
|
||||||
|
|
||||||
// Report an analyzer error. That analyzer will be set to not process
|
// Report an analyzer error. That analyzer will be set to not process
|
||||||
// any further input, but Bro otherwise continues normally.
|
// any further input, but Bro otherwise continues normally.
|
||||||
|
|
|
@ -144,7 +144,7 @@ public:
|
||||||
*
|
*
|
||||||
* @param msg The message. It will be prefixed with the thread's name.
|
* @param msg The message. It will be prefixed with the thread's name.
|
||||||
*/
|
*/
|
||||||
void InternalError(const char* msg);
|
[[noreturn]] void InternalError(const char* msg);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue