kernel-doc (084aa00162bda02bcab501c2b0a0ea9252d291b2) | kernel-doc (0b54c2e34be7987b5e0ffc0aa0e7dced7301cc1f) |
---|---|
1#!/usr/bin/env perl 2# SPDX-License-Identifier: GPL-2.0 3 4use warnings; 5use strict; 6 7## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ## 8## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ## --- 1398 unchanged lines hidden (view full) --- 1407 $members = $1; 1408 } elsif ($x =~ /enum\s+(\w*)\s*\{(.*)\}/) { 1409 $declaration_name = $1; 1410 $members = $2; 1411 } 1412 1413 if ($members) { 1414 if ($identifier ne $declaration_name) { | 1#!/usr/bin/env perl 2# SPDX-License-Identifier: GPL-2.0 3 4use warnings; 5use strict; 6 7## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ## 8## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ## --- 1398 unchanged lines hidden (view full) --- 1407 $members = $1; 1408 } elsif ($x =~ /enum\s+(\w*)\s*\{(.*)\}/) { 1409 $declaration_name = $1; 1410 $members = $2; 1411 } 1412 1413 if ($members) { 1414 if ($identifier ne $declaration_name) { |
1415 print STDERR "${file}:$.: warning: expecting prototype for enum $identifier. Prototype was for enum $declaration_name instead\n"; | 1415 if ($identifier eq "") { 1416 print STDERR "${file}:$.: warning: wrong kernel-doc identifier on line:\n"; 1417 } else { 1418 print STDERR "${file}:$.: warning: expecting prototype for enum $identifier. Prototype was for enum $declaration_name instead\n"; 1419 } |
1416 return; 1417 } | 1420 return; 1421 } |
1422 $declaration_name = "(anonymous)" if ($declaration_name eq ""); |
|
1418 1419 my %_members; 1420 1421 $members =~ s/\s+$//; 1422 1423 foreach my $arg (split ',', $members) { 1424 $arg =~ s/^\s*(\w+).*/$1/; 1425 push @parameterlist, $arg; --- 703 unchanged lines hidden (view full) --- 2129 } 2130 2131 if (($declaration_purpose eq "") && $verbose) { 2132 print STDERR "${file}:$.: warning: missing initial short description on line:\n"; 2133 print STDERR $_; 2134 ++$warnings; 2135 } 2136 | 1423 1424 my %_members; 1425 1426 $members =~ s/\s+$//; 1427 1428 foreach my $arg (split ',', $members) { 1429 $arg =~ s/^\s*(\w+).*/$1/; 1430 push @parameterlist, $arg; --- 703 unchanged lines hidden (view full) --- 2134 } 2135 2136 if (($declaration_purpose eq "") && $verbose) { 2137 print STDERR "${file}:$.: warning: missing initial short description on line:\n"; 2138 print STDERR $_; 2139 ++$warnings; 2140 } 2141 |
2137 if ($identifier eq "") { | 2142 if ($identifier eq "" && $decl_type ne "enum") { |
2138 print STDERR "${file}:$.: warning: wrong kernel-doc identifier on line:\n"; 2139 print STDERR $_; 2140 ++$warnings; 2141 $state = STATE_NORMAL; 2142 } 2143 2144 if ($verbose) { 2145 print STDERR "${file}:$.: info: Scanning doc for $decl_type $identifier\n"; --- 338 unchanged lines hidden --- | 2143 print STDERR "${file}:$.: warning: wrong kernel-doc identifier on line:\n"; 2144 print STDERR $_; 2145 ++$warnings; 2146 $state = STATE_NORMAL; 2147 } 2148 2149 if ($verbose) { 2150 print STDERR "${file}:$.: info: Scanning doc for $decl_type $identifier\n"; --- 338 unchanged lines hidden --- |