diff options
author | Moritz Jodeit <moritz@cvs.openbsd.org> | 2006-03-13 21:12:33 +0000 |
---|---|---|
committer | Moritz Jodeit <moritz@cvs.openbsd.org> | 2006-03-13 21:12:33 +0000 |
commit | 030cf20c38b6252d683b95e95e69ce1315f013b0 (patch) | |
tree | e6b6bd50ae9f09954b2cfb16a1eb862065cc3b94 /usr.bin/xlint/lint1 | |
parent | 2bbf5c811672d5b0c39d5784c61dd91913e8e045 (diff) |
Do not warn for functions declared with ARGSUSED
but having no arguments. ok deraadt@ cloder@
Diffstat (limited to 'usr.bin/xlint/lint1')
-rw-r--r-- | usr.bin/xlint/lint1/err.c | 7 | ||||
-rw-r--r-- | usr.bin/xlint/lint1/func.c | 8 | ||||
-rw-r--r-- | usr.bin/xlint/lint1/scan.l | 6 |
3 files changed, 8 insertions, 13 deletions
diff --git a/usr.bin/xlint/lint1/err.c b/usr.bin/xlint/lint1/err.c index fc464fc6205..9f4d2ec613c 100644 --- a/usr.bin/xlint/lint1/err.c +++ b/usr.bin/xlint/lint1/err.c @@ -1,4 +1,4 @@ -/* $OpenBSD: err.c,v 1.19 2006/03/08 07:18:51 moritz Exp $ */ +/* $OpenBSD: err.c,v 1.20 2006/03/13 21:12:32 moritz Exp $ */ /* $NetBSD: err.c,v 1.8 1995/10/02 17:37:00 jpo Exp $ */ /* @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: err.c,v 1.19 2006/03/08 07:18:51 moritz Exp $"; +static char rcsid[] = "$OpenBSD: err.c,v 1.20 2006/03/13 21:12:32 moritz Exp $"; #endif /* number of errors found */ @@ -368,8 +368,7 @@ const char *msgs[] = { "case ranges are illegal in ANSI C", /* 311 */ "suspicious operator for sizeof: %s", /* 312 */ "conversion of %s return value from '%s' to '%s'", /* 313 */ - "function %s declared with %s, but takes no arguments", /* 314 */ - "hexadecimal float constants are illegal in traditional C", /* 315 */ + "hexadecimal float constants are illegal in traditional C", /* 314 */ }; /* diff --git a/usr.bin/xlint/lint1/func.c b/usr.bin/xlint/lint1/func.c index 5d73a4e896b..0d391d3b0c3 100644 --- a/usr.bin/xlint/lint1/func.c +++ b/usr.bin/xlint/lint1/func.c @@ -1,4 +1,4 @@ -/* $OpenBSD: func.c,v 1.10 2005/12/17 21:08:27 cloder Exp $ */ +/* $OpenBSD: func.c,v 1.11 2006/03/13 21:12:32 moritz Exp $ */ /* $NetBSD: func.c,v 1.7 1995/10/02 17:31:40 jpo Exp $ */ /* @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: func.c,v 1.10 2005/12/17 21:08:27 cloder Exp $"; +static char rcsid[] = "$OpenBSD: func.c,v 1.11 2006/03/13 21:12:32 moritz Exp $"; #endif #include <stdlib.h> @@ -382,10 +382,6 @@ funcend(void) /* Print warnings for unused arguments */ arg = dcs->d_fargs; n = 0; - if (arg == NULL && nargusg == 0) { - warning(314, funcsym->s_name, "ARGSUSED"); - } - while (arg != NULL && (nargusg == -1 || n < nargusg)) { chkusg1(dcs->d_asm, arg); arg = arg->s_nxt; diff --git a/usr.bin/xlint/lint1/scan.l b/usr.bin/xlint/lint1/scan.l index 9dcc259bf84..50802fa2afd 100644 --- a/usr.bin/xlint/lint1/scan.l +++ b/usr.bin/xlint/lint1/scan.l @@ -1,5 +1,5 @@ %{ -/* $OpenBSD: scan.l,v 1.27 2006/01/16 22:16:14 espie Exp $ */ +/* $OpenBSD: scan.l,v 1.28 2006/03/13 21:12:32 moritz 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.27 2006/01/16 22:16:14 espie Exp $"; +static char rcsid[] = "$OpenBSD: scan.l,v 1.28 2006/03/13 21:12:32 moritz Exp $"; #endif #include <stdlib.h> @@ -716,7 +716,7 @@ fhexcon(void) if (tflag) { /* hex float constant are only legal in C99 */ - warning(315); + warning(314); } /* arbitrary value, until strtod can cope */ |