1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-03 10:44:24 +02:00

maint: mark some _Noreturn functions

* src/basenc.c (finish_and_exit, do_encode, do_decode):
* src/comm.c (compare_files):
* src/tsort.c (tsort):
* src/uptime.c (uptime):
Mark with _Noreturn.  Otherwise, unoptimized compilations may warn
that the calling renamed-main function doesn't return a value,
when !lint and when single-binary.
This commit is contained in:
Paul Eggert
2022-01-31 19:55:54 -08:00
parent fb7579768d
commit bcc479b0b5
4 changed files with 6 additions and 6 deletions

View File

@@ -949,7 +949,7 @@ wrap_write (char const *buffer, idx_t len,
}
}
static void
static _Noreturn void
finish_and_exit (FILE *in, char const *infile)
{
if (fclose (in) != 0)
@@ -963,7 +963,7 @@ finish_and_exit (FILE *in, char const *infile)
exit (EXIT_SUCCESS);
}
static void
static _Noreturn void
do_encode (FILE *in, char const *infile, FILE *out, idx_t wrap_column)
{
idx_t current_column = 0;
@@ -1007,7 +1007,7 @@ do_encode (FILE *in, char const *infile, FILE *out, idx_t wrap_column)
finish_and_exit (in, infile);
}
static void
static _Noreturn void
do_decode (FILE *in, char const *infile, FILE *out, bool ignore_garbage)
{
char *inbuf, *outbuf;

View File

@@ -251,7 +251,7 @@ check_order (struct linebuffer const *prev,
merge them and output the result.
Exit the program when done. */
static void
static _Noreturn void
compare_files (char **infiles)
{
/* For each file, we have four linebuffers in lba. */

View File

@@ -428,7 +428,7 @@ walk_tree (struct item *root, bool (*action) (struct item *))
/* Do a topological sort on FILE. Exit with appropriate exit status. */
static void
static _Noreturn void
tsort (char const *file)
{
bool ok = true;

View File

@@ -173,7 +173,7 @@ print_uptime (size_t n, const STRUCT_UTMP *this)
according to utmp file FILENAME. Use read_utmp OPTIONS to read the
utmp file. */
static void
static _Noreturn void
uptime (char const *filename, int options)
{
size_t n_users;