diff options
author | Guy Harris <guy@alum.mit.edu> | 2011-02-17 23:11:49 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2011-02-17 23:11:49 +0000 |
commit | b4f663a29bc1c9168108538d27c427a58c593668 (patch) | |
tree | 6507c1b3f0ac0ace859a109a49addbf4bc1f9c26 /epan/except.c | |
parent | dae52000024e82dbb5ca4d1cf573b95d9a831330 (diff) | |
download | wireshark-b4f663a29bc1c9168108538d27c427a58c593668.tar.gz wireshark-b4f663a29bc1c9168108538d27c427a58c593668.tar.bz2 wireshark-b4f663a29bc1c9168108538d27c427a58c593668.zip |
On Windows, try putting __declspec(noreturn) in front of declarations of
routines that don't return. (This requires that some files include
config.h to get WS_MSVC_NORETURN declared properly.)
svn path=/trunk/; revision=35989
Diffstat (limited to 'epan/except.c')
-rw-r--r-- | epan/except.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/epan/except.c b/epan/except.c index eea81d3a01..6138488227 100644 --- a/epan/except.c +++ b/epan/except.c @@ -26,6 +26,10 @@ * not freeing that). */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + #include <assert.h> #include <stdlib.h> #include <stdio.h> @@ -182,7 +186,7 @@ static int match(const volatile except_id_t *thrown, const except_id_t *caught) return group_match && code_match; } -G_GNUC_NORETURN static void do_throw(except_t *except) +G_GNUC_NORETURN WS_MSVC_NORETURN static void do_throw(except_t *except) { struct except_stacknode *top; @@ -263,7 +267,7 @@ struct except_stacknode *except_pop(void) return top; } -G_GNUC_NORETURN void except_rethrow(except_t *except) +G_GNUC_NORETURN WS_MSVC_NORETURN void except_rethrow(except_t *except) { struct except_stacknode *top = get_top(); assert (top != 0); @@ -273,7 +277,7 @@ G_GNUC_NORETURN void except_rethrow(except_t *except) do_throw(except); } -G_GNUC_NORETURN void except_throw(long group, long code, const char *msg) +G_GNUC_NORETURN WS_MSVC_NORETURN void except_throw(long group, long code, const char *msg) { except_t except; @@ -291,7 +295,7 @@ G_GNUC_NORETURN void except_throw(long group, long code, const char *msg) do_throw(&except); } -G_GNUC_NORETURN void except_throwd(long group, long code, const char *msg, void *data) +G_GNUC_NORETURN WS_MSVC_NORETURN void except_throwd(long group, long code, const char *msg, void *data) { except_t except; @@ -308,7 +312,7 @@ G_GNUC_NORETURN void except_throwd(long group, long code, const char *msg, void * XCEPT_BUFFER_SIZE? We could then just use this to generate formatted * messages. */ -G_GNUC_NORETURN void except_throwf(long group, long code, const char *fmt, ...) +G_GNUC_NORETURN WS_MSVC_NORETURN void except_throwf(long group, long code, const char *fmt, ...) { char *buf = except_alloc(XCEPT_BUFFER_SIZE); va_list vl; |