Patchwork checkpatch.pl: fix CAST detection to not screw with parens handling

login
register
mail settings
Submitter Florian Mickler
Date Nov. 3, 2010, 3:20 p.m.
Message ID <20101103162042.297958c3@schatten.dmk.lab>
Download mbox | patch
Permalink /patch/299172/
State New, archived
Headers show

Comments

Patch

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 90b54d4..06f5c44 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -859,7 +859,7 @@  sub annotate_values {
 				$av_preprocessor = 0;
 			}
 
-		} elsif ($cur =~ /^(\(\s*$Type\s*)\)/) {
+		} elsif ($cur =~ /^(\(\s*$Type\s*)\)/ && $av_pending eq '_') {
 			print "CAST($1)\n" if ($dbg_values > 1);
 			push(@av_paren_type, $type);
 			$type = 'C';