unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: "Đoàn Trần Công Danh" <congdanhqx@gmail.com>
To: notmuch@notmuchmail.org
Cc: "Đoàn Trần Công Danh" <congdanhqx@gmail.com>
Subject: [PATCH] notmuch-show: use correct format specifier for ssize_t
Date: Sun, 24 Jan 2021 23:07:57 +0700	[thread overview]
Message-ID: <20210124160757.17345-1-congdanhqx@gmail.com> (raw)

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.

 notmuch-show.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/notmuch-show.c b/notmuch-show.c
index dd836add..c0498c66 100644
--- a/notmuch-show.c
+++ b/notmuch-show.c
@@ -909,7 +909,7 @@ format_part_raw (unused (const void *ctx), unused (sprinter_t *sp),
 	    }
 
 	    if (ssize > 0 && fwrite (buf, ssize, 1, stdout) != 1) {
-		fprintf (stderr, "Error: Write %ld chars to stdout failed\n", ssize);
+		fprintf (stderr, "Error: Write %zd chars to stdout failed\n", ssize);
 		goto DONE;
 	    }
 	}
-- 
2.30.0\r

             reply	other threads:[~2021-01-24 16:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-24 16:07 Đoàn Trần Công Danh [this message]
2021-02-01 15:51 ` [PATCH] notmuch-show: use correct format specifier for ssize_t David Bremner
2021-02-02 17:52   ` Tomi Ollila
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=20210124160757.17345-1-congdanhqx@gmail.com \
    --to=congdanhqx@gmail.com \
    --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).