diff options
Diffstat (limited to 'epan')
-rw-r--r-- | epan/crc16.c | 4 | ||||
-rw-r--r-- | epan/crc32.c | 4 | ||||
-rw-r--r-- | epan/crypt/airpdcap_wep.c | 4 | ||||
-rw-r--r-- | epan/except.c | 14 | ||||
-rw-r--r-- | epan/except.h | 13 |
5 files changed, 25 insertions, 14 deletions
diff --git a/epan/crc16.c b/epan/crc16.c index af578c5efa..5fcd105dca 100644 --- a/epan/crc16.c +++ b/epan/crc16.c @@ -33,6 +33,10 @@ * DCEs using asynchronous-to-synchronous conversion", Para. 8.1.1.6.1 */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + #include <glib.h> #include <epan/tvbuff.h> #include <epan/crc16.h> diff --git a/epan/crc32.c b/epan/crc32.c index 3da5f52e2f..0fe2b29547 100644 --- a/epan/crc32.c +++ b/epan/crc32.c @@ -29,6 +29,10 @@ * Routine from Chris Waters */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + #include <glib.h> #include <epan/tvbuff.h> #include <epan/crc32.h> diff --git a/epan/crypt/airpdcap_wep.c b/epan/crypt/airpdcap_wep.c index cfccd733fb..45d02df7eb 100644 --- a/epan/crypt/airpdcap_wep.c +++ b/epan/crypt/airpdcap_wep.c @@ -33,6 +33,10 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + /************************************************************************/ /* File includes */ 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; diff --git a/epan/except.h b/epan/except.h index f648806a20..16ee729a1d 100644 --- a/epan/except.h +++ b/epan/except.h @@ -90,18 +90,13 @@ extern void except_setup_try(struct except_stacknode *, struct except_catch *, const except_id_t [], size_t); extern struct except_stacknode *except_pop(void); -/* - * XXX - is there some way to annotate the G_GNUC_NORETURN functions - * usint the Standard Annotation Language so that Microsoft's static - * code analyzer knows they never return? - */ /* public interface functions */ extern int except_init(void); extern void except_deinit(void); -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 WS_MSVC_NORETURN except_rethrow(except_t *) G_GNUC_NORETURN; +extern void WS_MSVC_NORETURN except_throw(long, long, const char *) G_GNUC_NORETURN; +extern void WS_MSVC_NORETURN except_throwd(long, long, const char *, void *) G_GNUC_NORETURN; +extern void WS_MSVC_NORETURN 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 *); |