Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2020-08-07 14:29:43 +0300
committerCorinna Vinschen <corinna@vinschen.de>2020-08-07 16:09:56 +0300
commite7fca6f867f441aaf54061545b297a62ce93708f (patch)
treeb36ba6baec69f39ef26d2ed8502fadca721d96fb /winsup/utils/locale.cc
parent9beb7b977162bd576da325ce8e23152e70989f78 (diff)
Cygwin: utils: convert usage() to proper noreturn function throughout
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/utils/locale.cc')
-rw-r--r--winsup/utils/locale.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/utils/locale.cc b/winsup/utils/locale.cc
index 1cd04337c..1eee9d240 100644
--- a/winsup/utils/locale.cc
+++ b/winsup/utils/locale.cc
@@ -42,7 +42,7 @@
#define LOCALE_ALIAS "/usr/share/locale/locale.alias"
#define LOCALE_ALIAS_LINE_LEN 255
-void
+static void __attribute__ ((__noreturn__))
usage ()
{
printf (
@@ -78,6 +78,7 @@ usage ()
" -h, --help This text\n"
" -V, --version Print program version and exit\n\n",
program_invocation_short_name);
+ exit (0);
}
void
@@ -811,7 +812,6 @@ main (int argc, char **argv)
break;
case 'h':
usage ();
- return 0;
case 'V':
print_version ();
return 0;