diff options
-rw-r--r-- | epan/except.c | 10 | ||||
-rw-r--r-- | epan/except.h | 9 |
2 files changed, 10 insertions, 9 deletions
diff --git a/epan/except.c b/epan/except.c index 3e22c1f9c3..0408eda29e 100644 --- a/epan/except.c +++ b/epan/except.c @@ -178,7 +178,7 @@ static int match(const volatile except_id_t *thrown, const except_id_t *caught) return group_match && code_match; } -static void do_throw(except_t *except) +G_GNUC_NORETURN static void do_throw(except_t *except) { struct except_stacknode *top; @@ -259,7 +259,7 @@ struct except_stacknode *except_pop(void) return top; } -void except_rethrow(except_t *except) +G_GNUC_NORETURN void except_rethrow(except_t *except) { struct except_stacknode *top = get_top(); assert (top != 0); @@ -269,7 +269,7 @@ void except_rethrow(except_t *except) do_throw(except); } -void except_throw(long group, long code, const char *msg) +G_GNUC_NORETURN void except_throw(long group, long code, const char *msg) { except_t except; @@ -287,7 +287,7 @@ void except_throw(long group, long code, const char *msg) do_throw(&except); } -void except_throwd(long group, long code, const char *msg, void *data) +G_GNUC_NORETURN void except_throwd(long group, long code, const char *msg, void *data) { except_t except; @@ -304,7 +304,7 @@ void except_throwd(long group, long code, const char *msg, void *data) * XCEPT_BUFFER_SIZE? We could then just use this to generate formatted * messages. */ -void except_throwf(long group, long code, const char *fmt, ...) +G_GNUC_NORETURN void except_throwf(long group, long code, const char *fmt, ...) { char *buf = except_alloc(XCEPT_BUFFER_SIZE); va_list vl; diff --git a/epan/except.h b/epan/except.h index 378441df47..363589417d 100644 --- a/epan/except.h +++ b/epan/except.h @@ -30,6 +30,7 @@ #ifndef XCEPT_H #define XCEPT_H +#include <glib.h> #include <setjmp.h> #include <stdlib.h> #include <assert.h> @@ -90,10 +91,10 @@ extern struct except_stacknode *except_pop(void); /* public interface functions */ extern int except_init(void); extern void except_deinit(void); -extern void except_rethrow(except_t *); -extern void except_throw(long, long, const char *); -extern void except_throwd(long, long, const char *, void *); -extern void except_throwf(long, long, const char *, ...); +extern void except_rethrow(except_t *) G_GNUC_NORETURN; +extern void except_throw(long, long, const char *) G_GNUC_NORETURN; +extern void except_throwd(long, long, const char *, void *) G_GNUC_NORETURN; +extern void except_throwf(long, long, const char *, ...) G_GNUC_NORETURN; extern void (*except_unhandled_catcher(void (*)(except_t *)))(except_t *); extern unsigned long except_code(except_t *); extern unsigned long except_group(except_t *); |