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
This commit is contained in:
наб 2022-02-16 03:02:00 +01:00 committed by Brian Behlendorf
parent a2995e7641
commit 15b982492a

View File

@ -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")