aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl11
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 114821364c00..1e7d2cdd0c20 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -782,9 +782,9 @@ sub annotate_values {
782 } 782 }
783 $type = 'N'; 783 $type = 'N';
784 784
785 } elsif ($cur =~ /^(if|while|typeof|__typeof__|for)\b/o) { 785 } elsif ($cur =~ /^(if|while|for)\b/o) {
786 print "COND($1)\n" if ($dbg_values > 1); 786 print "COND($1)\n" if ($dbg_values > 1);
787 $av_pending = 'N'; 787 $av_pending = 'E';
788 $type = 'N'; 788 $type = 'N';
789 789
790 } elsif ($cur =~/^(case)/o) { 790 } elsif ($cur =~/^(case)/o) {
@@ -792,7 +792,7 @@ sub annotate_values {
792 $av_pend_colon = 'C'; 792 $av_pend_colon = 'C';
793 $type = 'N'; 793 $type = 'N';
794 794
795 } elsif ($cur =~/^(return|else|goto)/o) { 795 } elsif ($cur =~/^(return|else|goto|typeof|__typeof__)\b/o) {
796 print "KEYWORD($1)\n" if ($dbg_values > 1); 796 print "KEYWORD($1)\n" if ($dbg_values > 1);
797 $type = 'N'; 797 $type = 'N';
798 798
@@ -1846,6 +1846,11 @@ sub process {
1846 $check = 0; 1846 $check = 0;
1847 } 1847 }
1848 1848
1849 # Ignore the current line if it is label.
1850 if ($s =~ /^\s*$Ident\s*:/) {
1851 $check = 0;
1852 }
1853
1849 my (undef, $sindent) = line_stats("+" . $s); 1854 my (undef, $sindent) = line_stats("+" . $s);
1850 1855
1851 ##print "line<$line> prevline<$prevline> indent<$indent> sindent<$sindent> check<$check> continuation<$continuation> s<$s>\n"; 1856 ##print "line<$line> prevline<$prevline> indent<$indent> sindent<$sindent> check<$check> continuation<$continuation> s<$s>\n";