From: Sami Kerola Date: Mon, 8 Oct 2012 07:08:13 +0000 (+0100) Subject: pg: add noreturn function attributes X-Git-Tag: v2.23-rc1~629 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f494ef65e0ad5a5798339124c7f90e874462df68;p=thirdparty%2Futil-linux.git pg: add noreturn function attributes Signed-off-by: Sami Kerola --- diff --git a/text-utils/pg.c b/text-utils/pg.c index 26f6c928bc..0e06e96800 100644 --- a/text-utils/pg.c +++ b/text-utils/pg.c @@ -208,7 +208,7 @@ static my_sighandler_t my_sigset(int sig, my_sighandler_t disp) { /* * Quit pg. */ -static void +static void __attribute__((__noreturn__)) quit(int status) { exit(status < 0100 ? status : 077); @@ -217,7 +217,7 @@ quit(int status) /* * Usage message and similar routines. */ -static void usage(FILE * out) +static void __attribute__((__noreturn__)) usage(FILE * out) { fputs(USAGE_HEADER, out); fprintf(out, @@ -240,14 +240,14 @@ static void usage(FILE * out) quit(out == stderr ? 2 : 0); } -static void +static void __attribute__((__noreturn__)) needarg(const char *s) { warnx(_("option requires an argument -- %s"), s); usage(stderr); } -static void +static void __attribute__((__noreturn__)) invopt(const char *s) { warnx(_("illegal option -- %s"), s); @@ -926,7 +926,7 @@ makepat(void) /* * Process errors that occurred in temporary file operations. */ -static void +static void __attribute__((__noreturn__)) tmperr(FILE *f, const char *ftype) { if (ferror(f))