aboutsummaryrefslogtreecommitdiffstats
path: root/epan/except.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2011-02-17 23:11:49 +0000
committerGuy Harris <guy@alum.mit.edu>2011-02-17 23:11:49 +0000
commitb4f663a29bc1c9168108538d27c427a58c593668 (patch)
tree6507c1b3f0ac0ace859a109a49addbf4bc1f9c26 /epan/except.c
parentdae52000024e82dbb5ca4d1cf573b95d9a831330 (diff)
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.c14
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;