From 95139d9d6a072308639b75e6146ff52c928cf0bd Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Thu, 24 Dec 2009 20:55:14 +0000 Subject: [PATCH] sh: Add some __dead2 to indicate functions that do not return. --- bin/sh/error.c | 2 +- bin/sh/error.h | 6 +++--- bin/sh/exec.h | 2 +- bin/sh/trap.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/sh/error.c b/bin/sh/error.c index 72061b8a1bef..3fc7101f8d31 100644 --- a/bin/sh/error.c +++ b/bin/sh/error.c @@ -67,7 +67,7 @@ volatile sig_atomic_t intpending; char *commandname; -static void exverror(int, const char *, va_list) __printf0like(2, 0); +static void exverror(int, const char *, va_list) __printf0like(2, 0) __dead2; /* * Called to raise an exception. Since C doesn't include exceptions, we diff --git a/bin/sh/error.h b/bin/sh/error.h index 38488c261e62..8b64fe6813d8 100644 --- a/bin/sh/error.h +++ b/bin/sh/error.h @@ -78,10 +78,10 @@ extern volatile sig_atomic_t intpending; #define CLEAR_PENDING_INT intpending = 0 #define int_pending() intpending -void exraise(int); +void exraise(int) __dead2; void onint(void); -void error(const char *, ...) __printf0like(1, 2); -void exerror(int, const char *, ...) __printf0like(2, 3); +void error(const char *, ...) __printf0like(1, 2) __dead2; +void exerror(int, const char *, ...) __printf0like(2, 3) __dead2; /* diff --git a/bin/sh/exec.h b/bin/sh/exec.h index 9803a5e7d9bc..200ddeab8362 100644 --- a/bin/sh/exec.h +++ b/bin/sh/exec.h @@ -60,7 +60,7 @@ struct cmdentry { extern const char *pathopt; /* set by padvance */ extern int exerrno; /* last exec error */ -void shellexec(char **, char **, const char *, int); +void shellexec(char **, char **, const char *, int) __dead2; char *padvance(const char **, const char *); int hashcmd(int, char **); void find_command(const char *, struct cmdentry *, int, const char *); diff --git a/bin/sh/trap.h b/bin/sh/trap.h index 672ad08d481f..8cc05da54dee 100644 --- a/bin/sh/trap.h +++ b/bin/sh/trap.h @@ -45,4 +45,4 @@ void ignoresig(int); void onsig(int); void dotrap(void); void setinteractive(int); -void exitshell(int); +void exitshell(int) __dead2;