diff options
author | Gerald Combs <gerald@wireshark.org> | 2009-07-30 17:54:58 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2009-07-30 17:54:58 +0000 |
commit | 6c99cf5519043c2c97631e38a9a0f4dfb7818eb8 (patch) | |
tree | f023dbf8fabdf2d170e95bbf469fe7436e9d1745 /epan/except.c | |
parent | b249ff0487eb1c87f0f2a3cda3ab658f3914c5a9 (diff) |
From Kovarththanan Rajaratnam via bug 3506:
The exception throwing code in except.c/h should be annotated with
"noreturn" to indicate that they never return. Running static analysis
on Wireshark without this annotation causes a lot of false positives
since these analyzers assume that the exception handling code are
ordinary functions that will eventually return.
svn path=/trunk/; revision=29246
Diffstat (limited to 'epan/except.c')
-rw-r--r-- | epan/except.c | 10 |
1 files changed, 5 insertions, 5 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; |