aboutsummaryrefslogtreecommitdiff
path: root/stdio-common/tstgetln.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdio-common/tstgetln.c')
-rw-r--r--stdio-common/tstgetln.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/stdio-common/tstgetln.c b/stdio-common/tstgetln.c
index b2e8263..0b5c2be 100644
--- a/stdio-common/tstgetln.c
+++ b/stdio-common/tstgetln.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -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");