This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Fix printf format mismatches
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: libc-alpha at sourceware dot org
- Date: Fri, 02 Nov 2012 20:26:53 +0100
- Subject: [PATCH] Fix printf format mismatches
* iconvdata/bug-iconv8.c (do_test): Use %z for size_t arguments.
* iconvdata/bug-iconv9.c (do_test): Use %t for ptrdiff_t
arguments.
---
iconvdata/bug-iconv8.c | 2 +-
iconvdata/bug-iconv9.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/iconvdata/bug-iconv8.c b/iconvdata/bug-iconv8.c
index 54c6be2..b91dc1d 100644
--- a/iconvdata/bug-iconv8.c
+++ b/iconvdata/bug-iconv8.c
@@ -24,7 +24,7 @@ do_test (void)
ret = iconv(cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
iconv_close(cd);
- printf("result: %ld %d %ld %d\n", ret, errno, inbytesleft, inbuf[0]);
+ printf("result: %zd %d %zd %d\n", ret, errno, inbytesleft, inbuf[0]);
/*
* result: -1 84 0 0 (84=EILSEQ)
diff --git a/iconvdata/bug-iconv9.c b/iconvdata/bug-iconv9.c
index e4ffd59..28f88d2 100644
--- a/iconvdata/bug-iconv9.c
+++ b/iconvdata/bug-iconv9.c
@@ -37,7 +37,7 @@ do_test (void)
}
if (in != inbuf + sizeof (inbuf) - 1)
{
- printf ("in advanced by %jd, expected %zu\n",
+ printf ("in advanced by %td, expected %zu\n",
in - inbuf, sizeof (inbuf) - 1);
res = 1;
}
--
1.8.0
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."