Message ID | 1377583247.2658.13.camel@joe-AO722 (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 9ba4fc4..520f8e7 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3869,6 +3869,18 @@ sub process { } } +# check for formats with "0x%#" + if ($line =~ /"X*"/) { + my $fmt = get_quoted_string($line, $rawline); + if ($fmt =~ /0x%#/) { + if (WARN("REDUNDANT_HEX", + "Redundant hex prefix 0x format\n" . $herecurr) && + $fix) { + $fixed[$linenr - 1] =~ s/0x%#/%#/g; + } + } + } + # Check for misused memsets if ($^V && $^V ge 5.10.0 && defined $stat &&