diff options
author | Chad Loder <cloder@cvs.openbsd.org> | 2006-05-28 23:42:50 +0000 |
---|---|---|
committer | Chad Loder <cloder@cvs.openbsd.org> | 2006-05-28 23:42:50 +0000 |
commit | 0766009f44fe7cced3df90d8979c98cfb232d185 (patch) | |
tree | 445761cd1e758d26f5a1955b49f7e1106a3b8cc5 /usr.bin | |
parent | b85ab7bfd8fb508ef89e7d6ccf02c86adfb35f10 (diff) |
Kill the -a option for lint, which controlled (inconsistently) warnings
regarding narrowing conversions. For now, lint still accepts and ignores
the -a option, but soon I will remove it utterly and change the default
LINTFLAGS.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/xlint/lint1/externs1.h | 3 | ||||
-rw-r--r-- | usr.bin/xlint/lint1/main1.c | 14 | ||||
-rw-r--r-- | usr.bin/xlint/lint1/tree.c | 6 | ||||
-rw-r--r-- | usr.bin/xlint/xlint/lint.1 | 16 |
4 files changed, 9 insertions, 30 deletions
diff --git a/usr.bin/xlint/lint1/externs1.h b/usr.bin/xlint/lint1/externs1.h index 4a50ac3ffc9..520025684a5 100644 --- a/usr.bin/xlint/lint1/externs1.h +++ b/usr.bin/xlint/lint1/externs1.h @@ -1,4 +1,4 @@ -/* $OpenBSD: externs1.h,v 1.12 2006/04/20 16:29:48 cloder Exp $ */ +/* $OpenBSD: externs1.h,v 1.13 2006/05/28 23:42:49 cloder Exp $ */ /* $NetBSD: externs1.h,v 1.7 1995/10/02 17:31:39 jpo Exp $ */ /* @@ -35,7 +35,6 @@ /* * main.c */ -extern int aflag; extern int bflag; extern int cflag; extern int dflag; diff --git a/usr.bin/xlint/lint1/main1.c b/usr.bin/xlint/lint1/main1.c index e91cd428a57..07c3d12d54f 100644 --- a/usr.bin/xlint/lint1/main1.c +++ b/usr.bin/xlint/lint1/main1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main1.c,v 1.8 2005/12/10 17:51:49 cloder Exp $ */ +/* $OpenBSD: main1.c,v 1.9 2006/05/28 23:42:49 cloder Exp $ */ /* $NetBSD: main1.c,v 1.3 1995/10/02 17:29:56 jpo Exp $ */ /* @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: main1.c,v 1.8 2005/12/10 17:51:49 cloder Exp $"; +static char rcsid[] = "$OpenBSD: main1.c,v 1.9 2006/05/28 23:42:49 cloder Exp $"; #endif #include <stdio.h> @@ -46,14 +46,6 @@ static char rcsid[] = "$OpenBSD: main1.c,v 1.8 2005/12/10 17:51:49 cloder Exp $" /* set yydebug to 1*/ int yflag; -/* - * Print warnings if an assignment of an integertype to another integertype - * causes an implicit narrowing conversion. If aflag is 1, these warnings - * are printed only if the source type is at least as wide as long. If aflag - * is greather then 1, they are always printed. - */ -int aflag; - /* Print a warning if a break statement cannot be reached. */ int bflag; @@ -117,7 +109,7 @@ main(int argc, char *argv[]) while ((c = getopt(argc, argv, "abcdefghprstuvyzF")) != -1) { switch (c) { - case 'a': aflag++; break; + case 'a': /* obsolete */ break; case 'b': bflag = 1; break; case 'c': cflag = 1; break; case 'd': dflag = 1; break; diff --git a/usr.bin/xlint/lint1/tree.c b/usr.bin/xlint/lint1/tree.c index 9ba37610137..4a10ab94806 100644 --- a/usr.bin/xlint/lint1/tree.c +++ b/usr.bin/xlint/lint1/tree.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tree.c,v 1.40 2006/05/05 20:00:35 otto Exp $ */ +/* $OpenBSD: tree.c,v 1.41 2006/05/28 23:42:49 cloder Exp $ */ /* $NetBSD: tree.c,v 1.12 1995/10/02 17:37:57 jpo Exp $ */ /* @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: tree.c,v 1.40 2006/05/05 20:00:35 otto Exp $"; +static char rcsid[] = "$OpenBSD: tree.c,v 1.41 2006/05/28 23:42:49 cloder Exp $"; #endif #include <stdlib.h> @@ -1751,7 +1751,7 @@ iiconv(op_t op, farg_t *farg, tspec_t nt, tspec_t ot, type_t *tp, tnode_t *tn) #if 0 if (psize(nt) > psize(ot) && isutyp(nt) != isutyp(ot)) { /* conversion to %s may sign-extend incorrectly */ - if (aflag && pflag) { + if (pflag) { if (op == FARG) { warning(297, funcname(farg->fa_func), arg, tyname(tp)); diff --git a/usr.bin/xlint/xlint/lint.1 b/usr.bin/xlint/xlint/lint.1 index c29f67903b5..b86bedcd36a 100644 --- a/usr.bin/xlint/xlint/lint.1 +++ b/usr.bin/xlint/xlint/lint.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: lint.1,v 1.18 2005/12/10 17:51:49 cloder Exp $ +.\" $OpenBSD: lint.1,v 1.19 2006/05/28 23:42:49 cloder Exp $ .\" $NetBSD: lint.1,v 1.3 1995/10/23 13:45:31 jpo Exp $ .\" .\" Copyright (c) 1994, 1995 Jochen Pohl @@ -38,7 +38,7 @@ .Nd a C program verifier .Sh SYNOPSIS .Nm lint -.Op Fl abcefghprvxzHFV +.Op Fl bcefghprvxzHFV .Op Fl s Ns | Ns Fl t .Op Fl i Ns | Ns Fl nu .Op Fl D Ns Ar name Ns Op =def @@ -150,18 +150,6 @@ will be printed followed by a question mark. .Pp The options are as follows: .Bl -tag -width Ds -.It Fl a -Report assignments of -.Sy long -values to variables that are not -.Sy long . -.It Fl aa -Additional to -.Fl a , -report -.Em all -assignments of integer values to other integer values which -cause implicit narrowing conversion. .It Fl b Report .Sy break |