Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1554748

[PATCH] checkpatch.pl: warn against using %Z

From Alexey Dobriyan <adobriyan@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] checkpatch.pl: warn against using %Z
Date 2017-01-09 23:10 +0100
Message-ID <sXQiB-1l8-23@gated-at.bofh.it> (permalink)
References <sVEvf-3xp-13@gated-at.bofh.it> <sWqJz-2cg-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


%Z is going to be removed in favour of %z.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 scripts/checkpatch.pl |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -5189,6 +5189,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);

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH] lib/vsprintf.c: remove %Z support Andrew Morton <akpm@linux-foundation.org> - 2017-01-06 01:40 +0100
  [PATCH] checkpatch.pl: warn against using %Z Alexey Dobriyan <adobriyan@gmail.com> - 2017-01-09 23:10 +0100
    Re: [PATCH] checkpatch.pl: warn against using %Z Joe Perches <joe@perches.com> - 2017-01-09 23:20 +0100

csiph-web