aboutsummaryrefslogtreecommitdiffstats
path: root/epan/except.h
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2009-07-30 17:54:58 +0000
committerGerald Combs <gerald@wireshark.org>2009-07-30 17:54:58 +0000
commit6c99cf5519043c2c97631e38a9a0f4dfb7818eb8 (patch)
treef023dbf8fabdf2d170e95bbf469fe7436e9d1745 /epan/except.h
parentb249ff0487eb1c87f0f2a3cda3ab658f3914c5a9 (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.h')
-rw-r--r--epan/except.h9
1 files changed, 5 insertions, 4 deletions
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 *);