From ab9f6255ab4e7aa353ec1b61b4f332bf00cea4d0 Mon Sep 17 00:00:00 2001 From: Stefan Liebler Date: Wed, 20 Jan 2016 08:32:37 +0100 Subject: S390: Fix build error in iconvdata/bug-iconv11.c. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes the following build error on S390 31bit while building the test iconvdata/bug-iconv11.c with gcc 5.3: bug-iconv11.c: In function ‘test_ibm93x’: bug-iconv11.c:59:11: error: format ‘%td’ expects argument of type ‘ptrdiff_t’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Werror=format=] printf (" ==> %td: %s\n" ^ cc1: all warnings being treated as errors This patch uses %zu format specifier for argument size_t ret instead of %td. ChangeLog: * iconvdata/bug-iconv11.c (test_ibm93x): Use %zu printf format specifier for size_t argument. --- ChangeLog | 5 +++++ iconvdata/bug-iconv11.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e5d46bcf3b..679aa7b535 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-01-19 Stefan Liebler + + * iconvdata/bug-iconv11.c (test_ibm93x): + Use %zu printf format specifier for size_t argument. + 2016-01-19 Joseph Myers * math/gen-libm-test.pl (parse_ulps): Do not reduce diff --git a/iconvdata/bug-iconv11.c b/iconvdata/bug-iconv11.c index 6cdc07d798..5b9d9a36af 100644 --- a/iconvdata/bug-iconv11.c +++ b/iconvdata/bug-iconv11.c @@ -56,7 +56,7 @@ test_ibm93x (const char *from_set, const char *input, size_t inbytesleft) errno = 0; size_t ret = iconv (cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft); - printf (" ==> %td: %s\n" + printf (" ==> %zu: %s\n" " inbuf%+td, inbytesleft=%zu, outbuf%+td, outbytesleft=%zu\n", ret, strerror (errno), inbuf - input, inbytesleft, outbuf - output, outbytesleft); -- cgit v1.2.3