more ATTNORETURN

A recent commit to alloc.c by Keni drew attention to the fact that
there are extern prototypes scattered around in various .c files.
Those can make use of ATTRNORETURN (non-gcc compilers and C23) the
same way the prototypes in extern.h can, and they were overlooked
when ATTRNORETURN was first added.
This commit is contained in:
nhmall
2023-01-12 15:38:15 -05:00
parent 1b4161c168
commit 6e136c6f7d
9 changed files with 26 additions and 22 deletions

View File

@@ -14,8 +14,8 @@
#include <string.h>
#endif
static void xexit(int) NORETURN;
extern void panic(const char *, ...) NORETURN;
ATTRNORETURN static void xexit(int) NORETURN;
ATTRNORETURN extern void panic(const char *, ...) NORETURN;
char *eos(char *); /* also used by dlb.c */
FILE *fopen_datafile(const char *, const char *);
unsigned FITSuint_(unsigned long long, const char *, int);
@@ -33,8 +33,8 @@ extern boolean open_library(const char *, library *);
extern void close_library(library *);
static void Write(int, char *, long);
static void usage(void) NORETURN;
static void verbose_help(void) NORETURN;
ATTRNORETURN static void usage(void) NORETURN;
ATTRNORETURN static void verbose_help(void) NORETURN;
static void write_dlb_directory(int, int, libdir *, long, long, long);
static char default_progname[] = "dlb";
@@ -78,7 +78,7 @@ static char origdir[255] = "";
* C dir chdir to dir (used ONCE, not like tar's -C)
*/
static void
ATTRNORETURN static void
usage(void)
{
(void) printf("Usage: %s [ctxCIfv] arguments... [files...]\n", progname);
@@ -88,7 +88,7 @@ usage(void)
/*NOTREACHED*/
}
static void
ATTRNORETURN static void
verbose_help(void)
{
static const char *const long_help[] = {
@@ -537,7 +537,7 @@ write_dlb_directory(int out, int nfiles, libdir *ld,
#endif /* DLBLIB */
#endif /* DLB */
static void
ATTRNORETURN static void
xexit(int retcd)
{
#ifdef DLB

View File

@@ -179,9 +179,9 @@ unsigned FITSuint_(unsigned long long, const char *, int);
#include "../src/mdlib.c"
static void makedefs_exit(int) NORETURN;
ATTRNORETURN static void makedefs_exit(int) NORETURN;
static void
ATTRNORETURN static void
makedefs_exit(int how)
{
#if 0 /* makedefs doesn't need to do this */