diff --git a/nbase/nbase_memalloc.c b/nbase/nbase_memalloc.c index 5a9d2166e..33b1cd647 100644 --- a/nbase/nbase_memalloc.c +++ b/nbase/nbase_memalloc.c @@ -98,7 +98,9 @@ #include "nbase.h" #include -static void fatal(char *fmt, ...) __attribute__ ((format(printf, 1, 2))); +static void fatal(char *fmt, ...) + __attribute__ ((noreturn)) + __attribute__ ((format (printf, 1, 2))); static void fatal(char *fmt, ...) { va_list ap; diff --git a/nsock/src/error.h b/nsock/src/error.h index 710ce4335..c7f17b2a5 100644 --- a/nsock/src/error.h +++ b/nsock/src/error.h @@ -75,9 +75,13 @@ #include #endif -void fatal(char *fmt, ...) __attribute__((noreturn)); +void fatal(char *fmt, ...) + __attribute__ ((noreturn)) + __attribute__ ((format (printf, 1, 2))); -void pfatal(char *fmt, ...) __attribute__((noreturn)); +void pfatal(char *fmt, ...) + __attribute__ ((noreturn)) + __attribute__ ((format (printf, 1, 2))); void gh_perror(char *err, ...);