From 3dc736d939536bcd843597cb655fcba28268705c Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 19 Aug 2017 11:25:24 -0700 Subject: Handle attributes for function pointers by checking the compiler version. Handle attributes for function pointers the same way we handle attributes for functions, by explicitly checking for the compiler version with #if rather than with a configure script check. That's one fewer thing that, if you're not using autoconf, has to be done in some other fashion. While we're at it, put NORETURN in the right place to have it work with Microsoft Visual Studio as well as various UN*X compilers. --- print.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'print.c') diff --git a/print.c b/print.c index 15468d6f..20d8ab51 100644 --- a/print.c +++ b/print.c @@ -226,9 +226,9 @@ static const struct printer printers[] = { static void ndo_default_print(netdissect_options *ndo, const u_char *bp, u_int length); -static void ndo_error(netdissect_options *ndo, - FORMAT_STRING(const char *fmt), ...) - NORETURN PRINTFLIKE(2, 3); +static void NORETURN ndo_error(netdissect_options *ndo, + FORMAT_STRING(const char *fmt), ...) + PRINTFLIKE(2, 3); static void ndo_warning(netdissect_options *ndo, FORMAT_STRING(const char *fmt), ...) PRINTFLIKE(2, 3); -- cgit v1.2.1