From: "H.J. Lu" <hjl.tools@gmail.com>
To: Joseph Myers <joseph@codesourcery.com>
Cc: GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH] string/stratcliff.c: Replace int with size_t [BZ #21982]
Date: Mon, 21 Aug 2017 13:51:00 -0000 [thread overview]
Message-ID: <CAMe9rOqX98b5sbeP+o4By+8nBQSEoJ7tBa-xVdpnuRpb5BuQ9Q@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1708211322300.16038@digraph.polyomino.org.uk>
On Mon, Aug 21, 2017 at 6:23 AM, Joseph Myers <joseph@codesourcery.com> wrote:
> 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).
>
There are some %Zd in string/stratcliff.c. Should they be changed?
Since All of them are size_t, I will replace %Zd with %zu.
--
H.J.
next prev parent reply other threads:[~2017-08-21 13:51 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-20 17:17 H.J. Lu
2017-08-21 13:25 ` Joseph Myers
2017-08-21 13:51 ` H.J. Lu [this message]
2017-08-21 13:56 ` Joseph Myers
2017-08-21 15:03 ` H.J. Lu
2017-08-21 13:49 ` Stefan Liebler
2017-08-21 14:53 ` H.J. Lu
2017-08-21 15:41 ` Stefan Liebler
2017-08-21 23:05 ` H.J. Lu
2017-08-22 12:07 ` Stefan Liebler
2017-08-22 12:43 ` H.J. Lu
2017-08-22 14:57 ` Stefan Liebler
2017-08-23 14:49 ` H.J. Lu
2017-09-07 16:20 ` H.J. Lu
2017-09-11 15:46 ` H.J. Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMe9rOqX98b5sbeP+o4By+8nBQSEoJ7tBa-xVdpnuRpb5BuQ9Q@mail.gmail.com \
--to=hjl.tools@gmail.com \
--cc=joseph@codesourcery.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).