checkpatch: handle casts better fixing false categorisation of : as binary
[linux-3.10.git] / scripts / checkpatch.pl
index 8d010ac..3cec299 100755 (executable)
@@ -845,6 +845,11 @@ sub annotate_values {
                                $av_preprocessor = 0;
                        }
 
+               } elsif ($cur =~ /^(\(\s*$Type\s*)\)/) {
+                       print "CAST($1)\n" if ($dbg_values > 1);
+                       push(@av_paren_type, $type);
+                       $type = 'C';
+
                } elsif ($cur =~ /^($Type)\s*(?:$Ident|,|\)|\(|\s*$)/) {
                        print "DECLARE($1)\n" if ($dbg_values > 1);
                        $type = 'T';