From: Karel Zak Date: Fri, 10 Dec 2010 15:47:18 +0000 (+0100) Subject: fix __noreturn__ usage X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abafd68667a965c033c5cef0646482433f6994b5;p=util-linux fix __noreturn__ usage Signed-off-by: Karel Zak --- diff --git a/login-utils/chsh.c b/login-utils/chsh.c index 41acc1ff..22b33506 100644 --- a/login-utils/chsh.c +++ b/login-utils/chsh.c @@ -82,7 +82,7 @@ static char *prompt (char *question, char *def_val); static int check_shell (char *shell); static boolean get_shell_list (char *shell); -static int __attribute__((__noreturn__)) usage (FILE *fp) +static void __attribute__((__noreturn__)) usage (FILE *fp) { fprintf (fp, _("Usage: %s [ -s shell ] [ --list-shells ] " diff --git a/misc-utils/findmnt.c b/misc-utils/findmnt.c index 9d3547b1..2b3a50b3 100644 --- a/misc-utils/findmnt.c +++ b/misc-utils/findmnt.c @@ -404,7 +404,7 @@ again: return fs; } -static int __attribute__((__noreturn__)) usage(FILE *out) +static void __attribute__((__noreturn__)) usage(FILE *out) { int i; @@ -456,7 +456,7 @@ static int __attribute__((__noreturn__)) usage(FILE *out) exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS); } -static int __attribute__((__noreturn__)) +static void __attribute__((__noreturn__)) errx_mutually_exclusive(const char *opts) { errx(EXIT_FAILURE, "%s %s", opts, _("options are mutually exclusive")); diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c index 745a3e61..cdfce42f 100644 --- a/misc-utils/lsblk.c +++ b/misc-utils/lsblk.c @@ -841,7 +841,7 @@ static void parse_excludes(const char *str) } } -static int __attribute__((__noreturn__)) help(FILE *out) +static void __attribute__((__noreturn__)) help(FILE *out) { int i; @@ -874,7 +874,7 @@ static int __attribute__((__noreturn__)) help(FILE *out) exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS); } -static int __attribute__((__noreturn__)) +static void __attribute__((__noreturn__)) errx_mutually_exclusive(const char *opts) { errx(EXIT_FAILURE, "%s %s", opts, _("options are mutually exclusive")); diff --git a/mount/sundries.c b/mount/sundries.c index 4cf30899..7190aca8 100644 --- a/mount/sundries.c +++ b/mount/sundries.c @@ -115,8 +115,8 @@ error (const char *fmt, ...) { } /* Fatal error. Print message and exit. */ - __attribute__ ((noreturn)) void -die(int err, const char *fmt, ...) { +void __attribute__ ((noreturn)) die(int err, const char *fmt, ...) +{ va_list args; va_start(args, fmt); diff --git a/partx/partx.c b/partx/partx.c index 031b285e..85590c2b 100644 --- a/partx/partx.c +++ b/partx/partx.c @@ -588,7 +588,7 @@ static blkid_partlist get_partlist(blkid_probe pr, return ls; } -static int __attribute__((__noreturn__)) usage(FILE *out) +static void __attribute__((__noreturn__)) usage(FILE *out) { int i; @@ -622,7 +622,7 @@ static int __attribute__((__noreturn__)) usage(FILE *out) exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS); } -static int __attribute__((__noreturn__)) +static void __attribute__((__noreturn__)) errx_mutually_exclusive(const char *opts) { errx(EXIT_FAILURE, "%s %s", opts, _("options are mutually exclusive")); diff --git a/sys-utils/renice.c b/sys-utils/renice.c index 8a60cd83..6b1a9726 100644 --- a/sys-utils/renice.c +++ b/sys-utils/renice.c @@ -49,7 +49,7 @@ static int donice(int,int,int); -static int __attribute__((__noreturn__)) usage(FILE *out) +static void __attribute__((__noreturn__)) usage(FILE *out) { fprintf(out, _( "\nUsage:\n"