svn commit: r200967 - head/bin/sh

Jilles Tjoelker jilles at FreeBSD.org
Thu Dec 24 20:55:15 UTC 2009


Author: jilles
Date: Thu Dec 24 20:55:14 2009
New Revision: 200967
URL: http://svn.freebsd.org/changeset/base/200967

Log:
  sh: Add some __dead2 to indicate functions that do not return.

Modified:
  head/bin/sh/error.c
  head/bin/sh/error.h
  head/bin/sh/exec.h
  head/bin/sh/trap.h

Modified: head/bin/sh/error.c
==============================================================================
--- head/bin/sh/error.c	Thu Dec 24 20:45:33 2009	(r200966)
+++ head/bin/sh/error.c	Thu Dec 24 20:55:14 2009	(r200967)
@@ -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

Modified: head/bin/sh/error.h
==============================================================================
--- head/bin/sh/error.h	Thu Dec 24 20:45:33 2009	(r200966)
+++ head/bin/sh/error.h	Thu Dec 24 20:55:14 2009	(r200967)
@@ -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;
 
 
 /*

Modified: head/bin/sh/exec.h
==============================================================================
--- head/bin/sh/exec.h	Thu Dec 24 20:45:33 2009	(r200966)
+++ head/bin/sh/exec.h	Thu Dec 24 20:55:14 2009	(r200967)
@@ -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 *);

Modified: head/bin/sh/trap.h
==============================================================================
--- head/bin/sh/trap.h	Thu Dec 24 20:45:33 2009	(r200966)
+++ head/bin/sh/trap.h	Thu Dec 24 20:55:14 2009	(r200967)
@@ -45,4 +45,4 @@ void ignoresig(int);
 void onsig(int);
 void dotrap(void);
 void setinteractive(int);
-void exitshell(int);
+void exitshell(int) __dead2;


More information about the svn-src-all mailing list