kernel-doc (b97f193abf83e30ef43317ba4883ce3a82f8e8b2) | kernel-doc (f9b5c5304ce212b72c5c997b298ab96002e1634f) |
---|---|
1#!/usr/bin/perl -w 2 3use strict; 4 5## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ## 6## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ## 7## Copyright (C) 2001 Simon Huggins ## 8## Copyright (C) 2005-2012 Randy Dunlap ## --- 2388 unchanged lines hidden (view full) --- 2397 my $file = shift; 2398 2399 if (($anon_struct_union == 1) && ($type eq "") && 2400 ($param eq "}")) { 2401 return; # ignore the ending }; from anon. struct/union 2402 } 2403 2404 $anon_struct_union = 0; | 1#!/usr/bin/perl -w 2 3use strict; 4 5## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ## 6## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ## 7## Copyright (C) 2001 Simon Huggins ## 8## Copyright (C) 2005-2012 Randy Dunlap ## --- 2388 unchanged lines hidden (view full) --- 2397 my $file = shift; 2398 2399 if (($anon_struct_union == 1) && ($type eq "") && 2400 ($param eq "}")) { 2401 return; # ignore the ending }; from anon. struct/union 2402 } 2403 2404 $anon_struct_union = 0; |
2405 my $param_name = $param; 2406 $param_name =~ s/\[.*//; | 2405 $param =~ s/[\[\)].*//; |
2407 2408 if ($type eq "" && $param =~ /\.\.\.$/) 2409 { 2410 if (!$param =~ /\w\.\.\.$/) { 2411 # handles unnamed variable parameters 2412 $param = "..."; 2413 } 2414 if (!defined $parameterdescs{$param} || $parameterdescs{$param} eq "") { --- 14 unchanged lines hidden (view full) --- 2429 $anon_struct_union = 1; 2430 } 2431 2432 # warn if parameter has no description 2433 # (but ignore ones starting with # as these are not parameters 2434 # but inline preprocessor statements); 2435 # also ignore unnamed structs/unions; 2436 if (!$anon_struct_union) { | 2406 2407 if ($type eq "" && $param =~ /\.\.\.$/) 2408 { 2409 if (!$param =~ /\w\.\.\.$/) { 2410 # handles unnamed variable parameters 2411 $param = "..."; 2412 } 2413 if (!defined $parameterdescs{$param} || $parameterdescs{$param} eq "") { --- 14 unchanged lines hidden (view full) --- 2428 $anon_struct_union = 1; 2429 } 2430 2431 # warn if parameter has no description 2432 # (but ignore ones starting with # as these are not parameters 2433 # but inline preprocessor statements); 2434 # also ignore unnamed structs/unions; 2435 if (!$anon_struct_union) { |
2437 if (!defined $parameterdescs{$param_name} && $param_name !~ /^#/) { | 2436 if (!defined $parameterdescs{$param} && $param !~ /^#/) { |
2438 | 2437 |
2439 $parameterdescs{$param_name} = $undescribed; | 2438 $parameterdescs{$param} = $undescribed; |
2440 2441 if (($type eq 'function') || ($type eq 'enum')) { 2442 print STDERR "${file}:$.: warning: Function parameter ". 2443 "or member '$param' not " . 2444 "described in '$declaration_name'\n"; 2445 } 2446 print STDERR "${file}:$.: warning:" . 2447 " No description found for parameter '$param'\n"; --- 768 unchanged lines hidden --- | 2439 2440 if (($type eq 'function') || ($type eq 'enum')) { 2441 print STDERR "${file}:$.: warning: Function parameter ". 2442 "or member '$param' not " . 2443 "described in '$declaration_name'\n"; 2444 } 2445 print STDERR "${file}:$.: warning:" . 2446 " No description found for parameter '$param'\n"; --- 768 unchanged lines hidden --- |