summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorнаб <nabijaczleweli@nabijaczleweli.xyz>2022-02-16 03:02:00 +0100
committerBrian Behlendorf <behlendorf1@llnl.gov>2022-02-18 09:35:06 -0800
commit15b982492a1fa8a3e75efd06b263121eda70e3a1 (patch)
treecba72d517b2aab23e2ee956f68eb93f7ce11db2d
parenta2995e76412d7621318c47ba4f0ed9d58566df2d (diff)
cstyle: forbid ARGSUSED
Reviewed-by: Alejandro Colomar <alx.manpages@gmail.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13110
-rwxr-xr-xscripts/cstyle.pl5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/cstyle.pl b/scripts/cstyle.pl
index d19718ecf..d4563cdc9 100755
--- a/scripts/cstyle.pl
+++ b/scripts/cstyle.pl
@@ -140,7 +140,7 @@ my %old2posix = (
);
my $lint_re = qr/\/\*(?:
- ARGSUSED[0-9]*|NOTREACHED|LINTLIBRARY|VARARGS[0-9]*|
+ NOTREACHED|LINTLIBRARY|VARARGS[0-9]*|
CONSTCOND|CONSTANTCOND|CONSTANTCONDITION|EMPTY|
FALLTHRU|FALLTHROUGH|LINTED.*?|PRINTFLIKE[0-9]*|
PROTOLIB[0-9]*|SCANFLIKE[0-9]*|CSTYLED.*?
@@ -385,6 +385,9 @@ line: while (<$filehandle>) {
if (/[^ \t(]\/\*/ && !/\w\(\/\*.*\*\/\);/) {
err("comment preceded by non-blank");
}
+ if (/ARGSUSED/) {
+ err("ARGSUSED directive");
+ }
# is this the beginning or ending of a function?
# (not if "struct foo\n{\n")