diff options
author | Adhemerval Zanella Netto <adhemerval.zanella@linaro.org> | 2022-09-01 10:02:30 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-09-22 08:48:04 -0300 |
commit | de477abcaaabb1f9815cb63876637a47a95e7ac1 (patch) | |
tree | 22bd98fe9a4aaa03257147db719e844fcdb42f7a /libio/tst-widetext.c | |
parent | 340097d0b50eff9d3058e06c6989ae398c653d4a (diff) | |
download | glibc-de477abcaaabb1f9815cb63876637a47a95e7ac1.tar.gz glibc-de477abcaaabb1f9815cb63876637a47a95e7ac1.tar.xz glibc-de477abcaaabb1f9815cb63876637a47a95e7ac1.zip |
Use '%z' instead of '%Z' on printf functions
The Z modifier is a nonstandard synonymn for z (that predates z itself) and compiler might issue an warning for in invalid conversion specifier. Reviewed-by: Florian Weimer <fweimer@redhat.com>
Diffstat (limited to 'libio/tst-widetext.c')
-rw-r--r-- | libio/tst-widetext.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libio/tst-widetext.c b/libio/tst-widetext.c index f1616bfb28..df9e965029 100644 --- a/libio/tst-widetext.c +++ b/libio/tst-widetext.c @@ -59,7 +59,7 @@ do_test (void) exit (1); } - printf ("INFO: input file has %Zd bytes\n", mbsize); + printf ("INFO: input file has %zd bytes\n", mbsize); /* First convert the text to wide characters. We use iconv here. */ { @@ -82,7 +82,7 @@ do_test (void) nonr = iconv (cd, &inbuf, &inleft, &outbuf, &outleft); if (nonr != 0 && nonr != (size_t) -1) { - printf ("%u: iconv performed %Zd nonreversible conversions\n", + printf ("%u: iconv performed %zd nonreversible conversions\n", __LINE__, nonr); exit (1); } @@ -90,7 +90,7 @@ do_test (void) if (nonr == (size_t) -1) { printf ("\ -%u: iconv returned with %Zd and errno = %m (inleft: %Zd, outleft: %Zd)\n", +%u: iconv returned with %zd and errno = %m (inleft: %zd, outleft: %zd)\n", __LINE__, nonr, inleft, outleft); exit (1); } @@ -163,7 +163,7 @@ do_test (void) wint_t wch = fgetwc (fp); if (wch == WEOF) { - printf ("%u: fgetwc failed (idx %Zd): %m\n", __LINE__, n); + printf ("%u: fgetwc failed (idx %zd): %m\n", __LINE__, n); exit (1); } wc2buf[n] = wch; @@ -290,7 +290,7 @@ do_test (void) { if (fgetws (wcp, &wc2buf[wcsize] - wcp + 1, fp) == NULL) { - printf ("%u: short read using fgetws (only %td of %Zd)\n", + printf ("%u: short read using fgetws (only %td of %zd)\n", __LINE__, wcp - wc2buf, wcsize); status = 1; break; |