From b4f663a29bc1c9168108538d27c427a58c593668 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 17 Feb 2011 23:11:49 +0000 Subject: 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 --- epan/except.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'epan/except.c') 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 #include #include @@ -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; -- cgit v1.2.3