This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] string/stratcliff.c: Replace int with size_t [BZ #21982]
- From: Joseph Myers <joseph at codesourcery dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Mon, 21 Aug 2017 13:23:30 +0000
- Subject: Re: [PATCH] string/stratcliff.c: Replace int with size_t [BZ #21982]
- Authentication-results: sourceware.org; auth=none
- References: <20170820171713.GA19531@gmail.com>
On Sun, 20 Aug 2017, H.J. Lu wrote:
> @@ -101,7 +101,7 @@ do_test (void)
>
> if (STRLEN (&adr[outer]) != (size_t) (inner - outer))
> {
> - printf ("%s flunked for outer = %d, inner = %d\n",
> + printf ("%s flunked for outer = %Zd, inner = %Zd\n",
I don't think we should be using legacy %Z in any new code. Use C99 %zu
for size_t (%zd only if the argument is the corresponding signed type
rather than size_t itself).
--
Joseph S. Myers
joseph@codesourcery.com