From: "Đoàn Trần Công Danh" <congdanhqx@gmail.com>
To: Tomi Ollila <tomi.ollila@iki.fi>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH] notmuch-show: use correct format specifier for ssize_t
Date: Fri, 5 Feb 2021 22:20:55 +0700 [thread overview]
Message-ID: <YB1iV7VBifHhG9tr@danh.dev> (raw)
In-Reply-To: <m235ye1hnv.fsf@guru.guru-group.fi>
On 2021-02-02 19:52:20+0200, Tomi Ollila <tomi.ollila@iki.fi> wrote:
> On Mon, Feb 01 2021, David Bremner wrote:
>
> > Đoàn Trần Công Danh <congdanhqx@gmail.com> writes:
> >
> >> Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
> >> ---
> >>
> >> I found this after inspecting one of my build today.
> >> I'm not sure what is acceptable action.
> >> I think using %zd is the right move.
> >> But I'm not sure if you prefer to case ssize to long int.
> >>
> >
> > If I understand correctly %zd is glibc specific? Is there a more portable way
> > to do this? Maybe that's what you meant by the cast.
>
> printf(3) is not too clear about that, In one place I understand
> %z is "SUSv3" compatible (what that says is something vague, perhaps just
> post C99), and in one place it says glibc 2.1 adds support for 'z' (but
> perhaps since it is in standard already)
Sorry for my late reply.
Yes %z is standard compliant, it's available from at least C99.
POSIX talks about it somewhere around that period
https://pubs.opengroup.org/onlinepubs/009695399/functions/fprintf.html
--
Danh
next prev parent reply other threads:[~2021-02-05 15:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-24 16:07 [PATCH] notmuch-show: use correct format specifier for ssize_t Đoàn Trần Công Danh
2021-02-01 15:51 ` David Bremner
2021-02-02 17:52 ` Tomi Ollila
2021-02-05 15:20 ` Đoàn Trần Công Danh [this message]
2021-02-05 14:17 ` David Bremner
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
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YB1iV7VBifHhG9tr@danh.dev \
--to=congdanhqx@gmail.com \
--cc=notmuch@notmuchmail.org \
--cc=tomi.ollila@iki.fi \
/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.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
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).