diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2007-09-05 16:32:18 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2007-09-05 16:32:18 +0000 |
commit | 4683dcf87f8379bc1ad025b2cd01dce184b5037a (patch) | |
tree | fd8c330495479746767f69cfdab9142ca786b8a3 | |
parent | ed47da20f88c516fbadf88729fa42159158ef87d (diff) |
Document NORETURN, add it to the directive list and rearrange the entries.
ok deraadt@.
-rw-r--r-- | usr.bin/xlint/lint1/scan.l | 7 | ||||
-rw-r--r-- | usr.bin/xlint/xlint/lint.1 | 10 |
2 files changed, 12 insertions, 5 deletions
diff --git a/usr.bin/xlint/lint1/scan.l b/usr.bin/xlint/lint1/scan.l index bd9be5ec642..a8cf8d71463 100644 --- a/usr.bin/xlint/lint1/scan.l +++ b/usr.bin/xlint/lint1/scan.l @@ -1,5 +1,5 @@ %{ -/* $OpenBSD: scan.l,v 1.30 2006/05/29 20:47:22 cloder Exp $ */ +/* $OpenBSD: scan.l,v 1.31 2007/09/05 16:32:17 fgsch Exp $ */ /* $NetBSD: scan.l,v 1.8 1995/10/23 13:38:51 jpo Exp $ */ /* @@ -34,7 +34,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: scan.l,v 1.30 2006/05/29 20:47:22 cloder Exp $"; +static char rcsid[] = "$OpenBSD: scan.l,v 1.31 2007/09/05 16:32:17 fgsch Exp $"; #endif #include <stdlib.h> @@ -999,6 +999,7 @@ directive(void) * LINTLIBRARY * LINTED NOSTRICT * LONGLONG + * NORETURN * NOTREACHED * PRINTFLIKEn * PROTOLIB @@ -1020,13 +1021,13 @@ comment(void) { "CONSTCOND", 0, constcond }, { "CONSTANTCOND", 0, constcond }, { "CONSTANTCONDITION", 0, constcond }, - { "NORETURN", 1, noreturn }, { "FALLTHRU", 0, fallthru }, { "FALLTHROUGH", 0, fallthru }, { "LINTLIBRARY", 0, lintlib }, { "LINTED", 0, linted }, { "LINTUSED", 0, lintused }, { "LONGLONG", 0, longlong }, + { "NORETURN", 1, noreturn }, { "NOSTRICT", 0, linted }, { "NOTREACHED", 0, notreach }, { "PRINTFLIKE", 1, printflike }, diff --git a/usr.bin/xlint/xlint/lint.1 b/usr.bin/xlint/xlint/lint.1 index 441302ed752..92a83a1cf60 100644 --- a/usr.bin/xlint/xlint/lint.1 +++ b/usr.bin/xlint/xlint/lint.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: lint.1,v 1.24 2007/05/31 19:20:20 jmc Exp $ +.\" $OpenBSD: lint.1,v 1.25 2007/09/05 16:32:17 fgsch Exp $ .\" $NetBSD: lint.1,v 1.3 1995/10/23 13:45:31 jpo Exp $ .\" .\" Copyright (c) 1994, 1995 Jochen Pohl @@ -30,7 +30,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: May 31 2007 $ +.Dd $Mdocdate: September 5 2007 $ .Dt LINT 1 .Os .Sh NAME @@ -360,6 +360,12 @@ preceding where the warning occurred. .It Li /* LONGLONG */ Suppress complaints about use of long long integer types. +.It Li /* NORETURN */ +tells +.Nm +that the function will never return, which means any code +following a call to this function is unreachable. This directive should +be placed immediately preceding the function. .It Li /* NOTREACHED */ At appropriate points, inhibit complaints about unreachable code. (This comment is typically placed just after calls to functions |