diff options
author | Martin Schwenke <martin@meltin.net> | 2019-06-24 17:01:07 +1000 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2019-07-05 05:03:24 +0000 |
commit | e5a946cba5c309a6bdd1109685866d4a1c6841be (patch) | |
tree | d34cd28c0c20d98c23b50548361daadd062568cb /ctdb | |
parent | ba95cb2ae1564edc27541c2a87e35f338e4653f7 (diff) | |
download | samba-e5a946cba5c309a6bdd1109685866d4a1c6841be.tar.gz |
ctdb-common: Mark ctdb_fatal() and ctdb_die() as _NORETURN_
This avoids static analysers continuing analysis after calls to these
functions and producing incorrect warnings.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb')
-rw-r--r-- | ctdb/common/common.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ctdb/common/common.h b/ctdb/common/common.h index 6b2c98ef383..79f6b9ed03a 100644 --- a/ctdb/common/common.h +++ b/ctdb/common/common.h @@ -20,6 +20,8 @@ #ifndef __CTDB_COMMON_H__ #define __CTDB_COMMON_H__ +#include "lib/util/attr.h" + /* From common/ctdb_io.c */ typedef void (*ctdb_queue_cb_fn_t)(uint8_t *data, size_t length, @@ -91,9 +93,9 @@ const char *ctdb_errstr(struct ctdb_context *ctdb); void ctdb_set_error(struct ctdb_context *ctdb, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3); -void ctdb_fatal(struct ctdb_context *ctdb, const char *msg); +void ctdb_fatal(struct ctdb_context *ctdb, const char *msg) _NORETURN_; -void ctdb_die(struct ctdb_context *ctdb, const char *msg); +void ctdb_die(struct ctdb_context *ctdb, const char *msg) _NORETURN_; bool ctdb_set_helper(const char *type, char *helper, size_t size, const char *envvar, |