unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: "David Bremner" <david@tethera.net>,
	"Đoàn Trần Công Danh" <congdanhqx@gmail.com>,
	notmuch@notmuchmail.org
Cc: "Đoàn Trần Công Danh" <congdanhqx@gmail.com>
Subject: Re: [PATCH] notmuch-show: use correct format specifier for ssize_t
Date: Tue, 02 Feb 2021 19:52:20 +0200	[thread overview]
Message-ID: <m235ye1hnv.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <87ft2fyefu.fsf@tethera.net>

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) 

Anyway, based on that I'd say %zd is standard compliant enough.

Tomi

  reply	other threads:[~2021-02-02 17:52 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 [this message]
2021-02-05 15:20     ` Đoàn Trần Công Danh
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=m235ye1hnv.fsf@guru.guru-group.fi \
    --to=tomi.ollila@iki.fi \
    --cc=congdanhqx@gmail.com \
    --cc=david@tethera.net \
    --cc=notmuch@notmuchmail.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.
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).