|
@@ -4482,6 +4482,14 @@ sub process {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+# check for mask then right shift without a parentheses
|
|
|
+ if ($^V && $^V ge 5.10.0 &&
|
|
|
+ $line =~ /$LvalOrFunc\s*\&\s*($LvalOrFunc)\s*>>/ &&
|
|
|
+ $4 !~ /^\&/) { # $LvalOrFunc may be &foo, ignore if so
|
|
|
+ WARN("MASK_THEN_SHIFT",
|
|
|
+ "Possible precedence defect with mask then right shift - may need parentheses\n" . $herecurr);
|
|
|
+ }
|
|
|
+
|
|
|
# check for bad placement of section $InitAttribute (e.g.: __initdata)
|
|
|
if ($line =~ /(\b$InitAttribute\b)/) {
|
|
|
my $attr = $1;
|