about summary refs log tree commit diff
path: root/stdio-common/tstgetln.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdio-common/tstgetln.c')
-rw-r--r--stdio-common/tstgetln.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/stdio-common/tstgetln.c b/stdio-common/tstgetln.c
index b2e8263283..c0a64d22c7 100644
--- a/stdio-common/tstgetln.c
+++ b/stdio-common/tstgetln.c
@@ -16,6 +16,7 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <stdio.h>
+#include <libc-diag.h>
 
 int
 main (int argc, char *argv[])
@@ -26,7 +27,12 @@ main (int argc, char *argv[])
 
   while ((len = getline (&buf, &size, stdin)) != -1)
     {
+      /* clang do not handle %Z format.  */
+      DIAG_PUSH_NEEDS_COMMENT_CLANG;
+      DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+      DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
       printf ("bufsize %Zu; read %Zd: ", size, len);
+      DIAG_POP_NEEDS_COMMENT_CLANG;
       if (fwrite (buf, len, 1, stdout) != 1)
 	{
 	  perror ("fwrite");