@@ -840,7 +840,6 @@ sub build_types {
840
840
our $declaration_macros = qr { (?x:
841
841
(?:$Storage \s +)?(?:[A-Z_][A-Z0-9]*_){0,2}(?:DEFINE|DECLARE)(?:_[A-Z0-9]+){1,6}\s *\( |
842
842
(?:$Storage \s +)?[HLP]?LIST_HEAD\s *\( |
843
- (?:$Storage \s +)?${Type} \s +uninitialized_var\s *\( |
844
843
(?:SKCIPHER_REQUEST|SHASH_DESC|AHASH_REQUEST)_ON_STACK\s *\(
845
844
)} ;
846
845
@@ -6330,8 +6329,7 @@ sub process {
6330
6329
if (defined $cond ) {
6331
6330
substr ($s , 0, length ($cond ), ' ' );
6332
6331
}
6333
- if ($s =~ / ^\s *;/ &&
6334
- $function_name ne ' uninitialized_var' )
6332
+ if ($s =~ / ^\s *;/ )
6335
6333
{
6336
6334
WARN(" AVOID_EXTERNS" ,
6337
6335
" externs should be avoided in .c files\n " . $herecurr );
@@ -6350,17 +6348,13 @@ sub process {
6350
6348
}
6351
6349
6352
6350
# check for function declarations that have arguments without identifier names
6353
- # while avoiding uninitialized_var(x)
6354
6351
if (defined $stat &&
6355
- $stat =~ / ^.\s *(?:extern\s +)?$Type \s *(?:($Ident )|\(\s *\*\s *$Ident \s *\) )\s *\(\s *([^{]+)\s *\)\s *;/s &&
6356
- (!defined ($1 ) ||
6357
- (defined ($1 ) && $1 ne " uninitialized_var" )) &&
6358
- $2 ne " void" ) {
6359
- my $args = trim($2 );
6352
+ $stat =~ / ^.\s *(?:extern\s +)?$Type \s *(?:$Ident |\(\s *\*\s *$Ident \s *\) )\s *\(\s *([^{]+)\s *\)\s *;/s &&
6353
+ $1 ne " void" ) {
6354
+ my $args = trim($1 );
6360
6355
while ($args =~ m /\s *($Type \s *(?:$Ident |\(\s *\*\s *$Ident ?\s *\)\s *$balanced_parens )?)/ g ) {
6361
6356
my $arg = trim($1 );
6362
- if ($arg =~ / ^$Type $ / &&
6363
- $arg !~ / enum\s +$Ident $ / ) {
6357
+ if ($arg =~ / ^$Type $ / && $arg !~ / enum\s +$Ident $ / ) {
6364
6358
WARN(" FUNCTION_ARGUMENTS" ,
6365
6359
" function definition argument '$arg ' should also have an identifier name\n " . $herecurr );
6366
6360
}
0 commit comments