diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/checkpatch.pl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 12db1483e6c2..289d61303cfc 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -5208,6 +5208,12 @@ sub process { "\%Ld/%Lu are not-standard C, use %lld/%llu\n" . $herecurr); last; } + # check for %Z + if ($string =~ /(?<!%)%[\*\d\.\$]*Z[diouxX]/) { + WARN("PRINTF_Z", + "%Z is non-standard C, use %z\n" . $herecurr); + last; + } if ($string =~ /0x%[\*\d\.\$\Llzth]*[udi]/) { ERROR("PRINTF_0xDECIMAL", "Prefixing 0x with decimal output is defective\n" . $herecurr); |