From 04e2cc99367d3eeb25c63b9a06d6505bfd54f2fe Mon Sep 17 00:00:00 2001 From: david Date: Tue, 7 Jun 2011 04:59:26 +0000 Subject: [PATCH] Add __attribute__((noreturn)) to netutil_fatal. --- libnetutil/netutil.cc | 3 --- libnetutil/netutil.h | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/libnetutil/netutil.cc b/libnetutil/netutil.cc index 0e02c628a..e32132302 100644 --- a/libnetutil/netutil.cc +++ b/libnetutil/netutil.cc @@ -157,9 +157,6 @@ int netutil_fatal(const char *str, ...){ va_end(list); exit(EXIT_FAILURE); - - return 0; - } /* End of fatal() */ /** Print error messages to stderr and then return. A newline diff --git a/libnetutil/netutil.h b/libnetutil/netutil.h index 6b4cf91e0..0a3202d3e 100644 --- a/libnetutil/netutil.h +++ b/libnetutil/netutil.h @@ -115,6 +115,7 @@ enum { OP_FAILURE = -1, OP_SUCCESS = 0 }; #endif int netutil_fatal(const char *str, ...) + __attribute__ ((noreturn)) __attribute__ ((format (printf, 1, 2))); int netutil_error(const char *str, ...)