From fa1213d90bf20067433737abb0f4880e8db349ed Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Sun, 7 Jun 2020 16:26:50 -0400 Subject: Replace __dead2 with __attribute__((noreturn)) sed 's/__dead2/__attribute__((noreturn))/' --- bin/1sh/arith_yacc.c | 2 +- bin/1sh/error.c | 2 +- bin/1sh/error.h | 8 ++++---- bin/1sh/exec.h | 2 +- bin/1sh/mknodes.c | 2 +- bin/1sh/parser.c | 4 ++-- bin/1sh/test.c | 2 +- bin/1sh/trap.h | 4 ++-- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/bin/1sh/arith_yacc.c b/bin/1sh/arith_yacc.c index 08e25ab3..57285831 100644 --- a/bin/1sh/arith_yacc.c +++ b/bin/1sh/arith_yacc.c @@ -86,7 +86,7 @@ static const char prec[ARITH_BINOP_MAX - ARITH_BINOP_MIN] = { int letcmd(int, char **); -static __dead2 void yyerror(const char *s) +static __attribute__((noreturn)) void yyerror(const char *s) { error("arithmetic expression: %s: \"%s\"", s, arith_startbuf); /* NOTREACHED */ diff --git a/bin/1sh/error.c b/bin/1sh/error.c index 1cc55ded..62d406f5 100644 --- a/bin/1sh/error.c +++ b/bin/1sh/error.c @@ -67,7 +67,7 @@ volatile sig_atomic_t suppressint; volatile sig_atomic_t intpending; -static void exverror(int, const char *, va_list) __printf0like(2, 0) __dead2; +static void exverror(int, const char *, va_list) __printf0like(2, 0) __attribute__((noreturn)); /* * Called to raise an exception. Since C doesn't include exceptions, we diff --git a/bin/1sh/error.h b/bin/1sh/error.h index b6d6b413..964d98e8 100644 --- a/bin/1sh/error.h +++ b/bin/1sh/error.h @@ -79,11 +79,11 @@ extern volatile sig_atomic_t intpending; #define CLEAR_PENDING_INT intpending = 0 #define int_pending() intpending -void exraise(int) __dead2; -void onint(void) __dead2; +void exraise(int) __attribute__((noreturn)); +void onint(void) __attribute__((noreturn)); void warning(const char *, ...) __printflike(1, 2); -void error(const char *, ...) __printf0like(1, 2) __dead2; -void exerror(int, const char *, ...) __printf0like(2, 3) __dead2; +void error(const char *, ...) __printf0like(1, 2) __attribute__((noreturn)); +void exerror(int, const char *, ...) __printf0like(2, 3) __attribute__((noreturn)); /* diff --git a/bin/1sh/exec.h b/bin/1sh/exec.h index 86cda649..f93c14c2 100644 --- a/bin/1sh/exec.h +++ b/bin/1sh/exec.h @@ -63,7 +63,7 @@ struct cmdentry { extern int exerrno; /* last exec error */ -void shellexec(char **, char **, const char *, int) __dead2; +void shellexec(char **, char **, const char *, int) __attribute__((noreturn)); char *padvance(const char **, const char **, const char *); void find_command(const char *, struct cmdentry *, int, const char *); int find_builtin(const char *, int *); diff --git a/bin/1sh/mknodes.c b/bin/1sh/mknodes.c index a90acff1..e5eacb14 100644 --- a/bin/1sh/mknodes.c +++ b/bin/1sh/mknodes.c @@ -104,7 +104,7 @@ static void indent(int, FILE *); static int nextfield(char *); static void skipbl(void); static int readline(FILE *); -static void error(const char *, ...) __printf0like(1, 2) __dead2; +static void error(const char *, ...) __printf0like(1, 2) __attribute__((noreturn)); static char *savestr(const char *); diff --git a/bin/1sh/parser.c b/bin/1sh/parser.c index a6f976ed..b2f761c8 100644 --- a/bin/1sh/parser.c +++ b/bin/1sh/parser.c @@ -126,8 +126,8 @@ static int xxreadtoken(void); static int readtoken1(int, const char *, const char *, int); static int noexpand(char *); static void consumetoken(int); -static void synexpect(int) __dead2; -static void synerror(const char *) __dead2; +static void synexpect(int) __attribute__((noreturn)); +static void synerror(const char *) __attribute__((noreturn)); static void setprompt(int); static char *expandprompt(const char *); static int pgetc_linecont(void); diff --git a/bin/1sh/test.c b/bin/1sh/test.c index 594a7d89..71c62e11 100644 --- a/bin/1sh/test.c +++ b/bin/1sh/test.c @@ -38,7 +38,7 @@ #else #include -static void error(const char *, ...) __dead2 __printf0like(1, 2); +static void error(const char *, ...) __attribute__((noreturn)) __printf0like(1, 2); static void error(const char *msg, ...) diff --git a/bin/1sh/trap.h b/bin/1sh/trap.h index 88076fc2..75427d56 100644 --- a/bin/1sh/trap.h +++ b/bin/1sh/trap.h @@ -46,5 +46,5 @@ int issigchldtrapped(void); void onsig(int); void dotrap(void); void setinteractive(void); -void exitshell(int) __dead2; -void exitshell_savedstatus(void) __dead2; +void exitshell(int) __attribute__((noreturn)); +void exitshell_savedstatus(void) __attribute__((noreturn)); -- cgit 1.4.1 Jason A. Donenfeld 2014-02-05gen-version.sh: check if git is available before trying to call itFabien C 2014-01-23simple-authentication: styleJason A. Donenfeld 2014-01-22makefile: use LUA_PKGCONFIG to set Lua implementationNatanael Copa 2014-01-20tests: only do lua tests if lua is compiled-inJason A. Donenfeld 2014-01-20cgit: add --version argument for printing infoJason A. Donenfeld 2014-01-19cache: use sendfile() instead of a pair of read() + write()Sebastian Andrzej Siewior 2014-01-19README: document pkg-config for luajitJason A. Donenfeld 2014-01-17makefile: bump versionJason A. Donenfeld 2014-01-17mailmap: source before lighttpdJason A. Donenfeld 2014-01-17ui-shared: do not allow negative minutesJason A. Donenfeld 2014-01-17auth: document tweakables in lua scriptJason A. Donenfeld 2014-01-17repolist: make owner clickable to searchJason A. Donenfeld 2014-01-17ui-shared: move about tab all the way to the leftJason A. Donenfeld 2014-01-17filter: don't forget to reap the auth filterJason A. Donenfeld 2014-01-17cgit.c: free tmp variableJason A. Donenfeld 2014-01-17Switch to exclusively using global ctxLukas Fleischer 2014-01-16auth: have cgit calculate login addressJason A. Donenfeld 2014-01-16auth: lua string comparisons are time invariantJason A. Donenfeld 2014-01-16authentication: use hidden form instead of refererJason A. Donenfeld 2014-01-16auth: add basic authentication filter frameworkJason A. Donenfeld 2014-01-16t0111: Additions and fixesLukas Fleischer 2014-01-16parsing.c: Remove leading space from committerLukas Fleischer