A label is not a candidate for a possible type. Exclude them.
Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all
Unified · Split
| @@ -1324,7 +1324,7 @@ sub process { · 1323 unmodified lines | |||
| 1324 | possible($type, "A:" . $s); | 1324 | possible($type, "A:" . $s); |
| 1325 | 1325 | ||
| 1326 | # definitions in global scope can only start with types | 1326 | # definitions in global scope can only start with types |
| 1327 | } elsif ($s =~ /^.(?:$Storage\s+)?(?:$Inline\s+)?(?:const\s+)?($Ident)\b/s) { | 1327 | } elsif ($s =~ /^.(?:$Storage\s+)?(?:$Inline\s+)?(?:const\s+)?($Ident)\b\s*(?!:)/s) { |
| 1328 | possible($1, "B:" . $s); | 1328 | possible($1, "B:" . $s); |
| 1329 | } | 1329 | } |
| 1330 | 1330 | ||