From f494ef65e0ad5a5798339124c7f90e874462df68 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Mon, 8 Oct 2012 08:08:13 +0100 Subject: pg: add noreturn function attributes Signed-off-by: Sami Kerola --- text-utils/pg.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'text-utils') diff --git a/text-utils/pg.c b/text-utils/pg.c index 26f6c928b..0e06e9680 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)) -- cgit v1.2.3-55-g7522