Cygwin: utils: convert usage() to proper noreturn function throughout

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2020-08-07 13:29:43 +02:00
parent 9beb7b9771
commit e7fca6f867
23 changed files with 55 additions and 111 deletions

View File

@@ -180,7 +180,7 @@ print_version ()
strrchr (__DATE__, ' ') + 1);
}
static void
static void __attribute__ ((__noreturn__))
usage (FILE *stream)
{
fprintf (stream, "Usage: %s [-RVadhln] [file]...\n",
@@ -221,6 +221,7 @@ usage (FILE *stream)
" 'C', 'Casesensitive': directory is handled case sensitive\n"
" (Windows 10 1803 or later, local NTFS only,\n"
" WSL must be installed)\n");
exit (stream == stdout ? 0 : 1);
}
int
@@ -254,7 +255,7 @@ main (int argc, char **argv)
case 'h':
default:
usage (c == 'h' ? stdout : stderr);
return 1;
break;
}
}
if (optind > argc - 1)