summaryrefslogtreecommitdiff
path: root/print.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-08-19 11:25:24 -0700
committerGuy Harris <guy@alum.mit.edu>2017-08-19 11:25:24 -0700
commit3dc736d939536bcd843597cb655fcba28268705c (patch)
tree6c69e8113f12d847aa00e1c56df66c5777a43137 /print.c
parent297bf6343f27ea1d18e5dad529c253ffd3935d41 (diff)
downloadtcpdump-3dc736d939536bcd843597cb655fcba28268705c.tar.gz
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.
Diffstat (limited to 'print.c')
-rw-r--r--print.c6
1 files changed, 3 insertions, 3 deletions
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);