mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
checkpatch: possible types -- else cannot start a type
An else cannot start a type, it would have to be within a block after the else. This can trigger false modifier matching. Signed-off-by: Andy Whitcroft <apw@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
fc0d8d944d
commit
463f286485
1 changed files with 2 additions and 0 deletions
|
@ -1372,6 +1372,8 @@ sub process {
|
|||
# Ignore functions being called
|
||||
} elsif ($s =~ /^.\s*$Ident\s*\(/s) {
|
||||
|
||||
} elsif ($s =~ /^.\s*else\b/s) {
|
||||
|
||||
# declarations always start with types
|
||||
} elsif ($prev_values eq 'E' && $s =~ /^.\s*(?:$Storage\s+)?(?:$Inline\s+)?(?:const\s+)?((?:\s*$Ident)+?)\b(?:\s+$Sparse)?\s*\**\s*(?:$Ident|\(\*[^\)]*\))(?:\s*$Modifier)?\s*(?:;|=|,|\()/s) {
|
||||
my $type = $1;
|
||||
|
|
Loading…
Reference in a new issue