Add [] to a type extensions. Fixes false positives on: .attrs = (struct attribute *[]) {
Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all
Unified · Split
| @@ -323,7 +323,7 @@ sub build_types { · 322 unmodified lines | ||
| 323 | 323 | }x; |
| 324 | 324 | $Type = qr{ |
| 325 | 325 | $NonptrType |
| 326 | − (?:[\s\*]+\s*const|[\s\*]+|(?:\s*\[\s*\])+)? | |
| 326 | + (?:(?:\s|\*|\[\])+\s*const|(?:\s|\*|\[\])+|(?:\s*\[\s*\])+)? | |
| 327 | 327 | (?:\s+$Inline|\s+$Modifier)* |
| 328 | 328 | }x; |
| 329 | 329 | $Declare = qr{(?:$Storage\s+)?$Type}; |