Module Name: src
Committed By: christos
Date: Fri Apr 19 18:51:15 UTC 2013
Modified Files:
src/usr.bin/xlint/lint1: decl.c scan.l tree.c
src/usr.bin/xlint/xlint: lint.1
Log Message:
make NOSTRICT behave the same a LINTED; use the new format.
To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/usr.bin/xlint/lint1/decl.c
cvs rdiff -u -r1.51 -r1.52 src/usr.bin/xlint/lint1/scan.l
cvs rdiff -u -r1.72 -r1.73 src/usr.bin/xlint/lint1/tree.c
cvs rdiff -u -r1.36 -r1.37 src/usr.bin/xlint/xlint/lint.1
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/xlint/lint1/decl.c
diff -u src/usr.bin/xlint/lint1/decl.c:1.56 src/usr.bin/xlint/lint1/decl.c:1.57
--- src/usr.bin/xlint/lint1/decl.c:1.56 Fri Apr 19 13:43:05 2013
+++ src/usr.bin/xlint/lint1/decl.c Fri Apr 19 14:51:14 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.56 2013/04/19 17:43:05 christos Exp $ */
+/* $NetBSD: decl.c,v 1.57 2013/04/19 18:51:14 christos Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: decl.c,v 1.56 2013/04/19 17:43:05 christos Exp $");
+__RCSID("$NetBSD: decl.c,v 1.57 2013/04/19 18:51:14 christos Exp $");
#endif
#include <sys/param.h>
@@ -425,7 +425,7 @@ tdeferr(type_t *td, tspec_t t)
return (td);
}
break;
- /* LINTED (enumeration values not handled in switch) */
+ /* LINTED206: (enumeration values not handled in switch) */
case NOTSPEC:
case USHORT:
case UCHAR:
@@ -2878,7 +2878,7 @@ chkusage(dinfo_t *di)
sym_t *sym;
int mklwarn;
- /* for this warnings LINTED has no effect */
+ /* for this warning LINTED has no effect */
mklwarn = lwarn;
lwarn = LWARN_ALL;
Index: src/usr.bin/xlint/lint1/scan.l
diff -u src/usr.bin/xlint/lint1/scan.l:1.51 src/usr.bin/xlint/lint1/scan.l:1.52
--- src/usr.bin/xlint/lint1/scan.l:1.51 Fri Apr 19 13:43:05 2013
+++ src/usr.bin/xlint/lint1/scan.l Fri Apr 19 14:51:14 2013
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: scan.l,v 1.51 2013/04/19 17:43:05 christos Exp $ */
+/* $NetBSD: scan.l,v 1.52 2013/04/19 18:51:14 christos Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: scan.l,v 1.51 2013/04/19 17:43:05 christos Exp $");
+__RCSID("$NetBSD: scan.l,v 1.52 2013/04/19 18:51:14 christos Exp $");
#endif
#include <stdlib.h>
@@ -604,7 +604,7 @@ icon(int base)
warning(252);
}
break;
- /* LINTED (enumeration values not handled in switch) */
+ /* LINTED206: (enumeration values not handled in switch) */
case STRUCT:
case VOID:
case LDOUBLE:
@@ -1084,7 +1084,7 @@ directive(void)
* CONSTCOND CONSTANTCOND CONSTANTCONDITION
* FALLTHRU FALLTHROUGH
* LINTLIBRARY
- * LINTED NOSTRICT
+ * LINTEDn NOSTRICTn
* LONGLONG
* NOTREACHED
* PRINTFLIKEn
@@ -1113,7 +1113,7 @@ comment(void)
{ "LINTLIBRARY", 0, lintlib },
{ "LINTED", 1, linted },
{ "LONGLONG", 0, longlong },
- { "NOSTRICT", 0, linted },
+ { "NOSTRICT", 1, linted },
{ "NOTREACHED", 0, notreach },
{ "PRINTFLIKE", 1, printflike },
{ "PROTOLIB", 1, protolib },
Index: src/usr.bin/xlint/lint1/tree.c
diff -u src/usr.bin/xlint/lint1/tree.c:1.72 src/usr.bin/xlint/lint1/tree.c:1.73
--- src/usr.bin/xlint/lint1/tree.c:1.72 Sat Mar 2 16:25:12 2013
+++ src/usr.bin/xlint/lint1/tree.c Fri Apr 19 14:51:14 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: tree.c,v 1.72 2013/03/02 21:25:12 christos Exp $ */
+/* $NetBSD: tree.c,v 1.73 2013/04/19 18:51:14 christos Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: tree.c,v 1.72 2013/03/02 21:25:12 christos Exp $");
+__RCSID("$NetBSD: tree.c,v 1.73 2013/04/19 18:51:14 christos Exp $");
#endif
#include <stdlib.h>
@@ -1039,7 +1039,7 @@ typeok(op_t op, int arg, tnode_t *ln, tn
if (!modtab[ln->tn_op].m_sideeff)
nulleff(ln);
break;
- /* LINTED (enumeration values not handled in switch) */
+ /* LINTED206: (enumeration values not handled in switch) */
case CON:
case CASE:
case PUSH:
@@ -3580,7 +3580,7 @@ chkmisc(tnode_t *tn, int vctx, int tctx,
case NAME:
case STRING:
return;
- /* LINTED (enumeration values not handled in switch) */
+ /* LINTED206: (enumeration values not handled in switch) */
case OR:
case XOR:
case NE:
@@ -3969,7 +3969,7 @@ precconf(tnode_t *tn)
}
}
break;
- /* LINTED (enumeration values not handled in switch) */
+ /* LINTED206: (enumeration values not handled in switch) */
case DECAFT:
case XORASS:
case SHLASS:
Index: src/usr.bin/xlint/xlint/lint.1
diff -u src/usr.bin/xlint/xlint/lint.1:1.36 src/usr.bin/xlint/xlint/lint.1:1.37
--- src/usr.bin/xlint/xlint/lint.1:1.36 Fri Apr 19 14:46:50 2013
+++ src/usr.bin/xlint/xlint/lint.1 Fri Apr 19 14:51:14 2013
@@ -1,4 +1,4 @@
-.\" $NetBSD: lint.1,v 1.36 2013/04/19 18:46:50 christos Exp $
+.\" $NetBSD: lint.1,v 1.37 2013/04/19 18:51:14 christos Exp $
.\"
.\" Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
.\" Copyright (c) 1994, 1995 Jochen Pohl
@@ -446,7 +446,7 @@ At the beginning of a file, mark all fun
in this file as
.Em used .
Also shut off complaints about unused function arguments.
-.It Li /* LINTED Ns Ar n Li Oo Ar comment Oc Li */ No or Li /* NOSTRICT Oo Ar comment Oc Li */
+.It Li /* LINTED Ns Ar n Li Oo Ar comment Oc Li */ No or Li /* NOSTRICT Ns Ar n Li Oo Ar comment Oc Li */
Suppresses any intra-file warning except those dealing with
unused variables or functions.
This directive should be placed