History

checkpatch: avoid some false positives for TABSTOP declaration test

Using an open bracket after what seems to be a declaration can also be a function definition and declaration argument line continuation so remove the open bracket from the possible declaration/definition matching. e.g.: int foobar(int a; int *b[]);

Joe Perches committed 8 years ago

Commit bd491111 parent a032aa41 file · +1 −1Browse files

Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all

Unified · Split

scripts/checkpatch.pl+1−1
@@ -3020,7 +3020,7 @@ sub process { · 3019 unmodified lines
3020 3020
3021# check indentation starts on a tab stop3021# check indentation starts on a tab stop
3022 if ($^V && $^V ge 5.10.0 &&3022 if ($^V && $^V ge 5.10.0 &&
3023 $sline =~ /^\+\t+( +)(?:$c90_Keywords\b|\{\s*$|\}\s*(?:else\b|while\b|\s*$)|$Declare\s*$Ident\s*[;=\[])/) {3023 $sline =~ /^\+\t+( +)(?:$c90_Keywords\b|\{\s*$|\}\s*(?:else\b|while\b|\s*$)|$Declare\s*$Ident\s*[;=])/) {
3024 my $indent = length($1);3024 my $indent = length($1);
3025 if ($indent % 8) {3025 if ($indent % 8) {
3026 if (WARN("TABSTOP",3026 if (WARN("TABSTOP",