Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
S390: Fix build error in iconvdata/bug-iconv11.c.
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.
  • Loading branch information
Stefan Liebler committed Jan 20, 2016
1 parent 2e3d0de commit ab9f625
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
2016-01-19 Stefan Liebler <stli@linux.vnet.ibm.com>

* iconvdata/bug-iconv11.c (test_ibm93x):
Use %zu printf format specifier for size_t argument.

2016-01-19 Joseph Myers <joseph@codesourcery.com> 2016-01-19 Joseph Myers <joseph@codesourcery.com>


* math/gen-libm-test.pl (parse_ulps): Do not reduce * math/gen-libm-test.pl (parse_ulps): Do not reduce
Expand Down
2 changes: 1 addition & 1 deletion iconvdata/bug-iconv11.c
Expand Up @@ -56,7 +56,7 @@ test_ibm93x (const char *from_set, const char *input, size_t inbytesleft)


errno = 0; errno = 0;
size_t ret = iconv (cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft); 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", " inbuf%+td, inbytesleft=%zu, outbuf%+td, outbytesleft=%zu\n",
ret, strerror (errno), ret, strerror (errno),
inbuf - input, inbytesleft, outbuf - output, outbytesleft); inbuf - input, inbytesleft, outbuf - output, outbytesleft);
Expand Down

0 comments on commit ab9f625

Please sign in to comment.