From: Piotr Trojanek <piotr.trojanek@gmail.com>
To: notmuch@notmuchmail.org
Subject: [PATCH 4/5] fix wrong printf formatting of signed/unsigned integers
Date: Fri, 16 Jun 2017 23:50:25 +0100 [thread overview]
Message-ID: <20170616225026.8098-4-piotr.trojanek@gmail.com> (raw)
In-Reply-To: <20170616225026.8098-1-piotr.trojanek@gmail.com>
---
notmuch-count.c | 2 +-
notmuch-new.c | 4 ++--
notmuch-reply.c | 2 +-
notmuch-show.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git notmuch-count.c notmuch-count.c
index a05b430d..50b0c193 100644
--- notmuch-count.c
+++ notmuch-count.c
@@ -111,7 +111,7 @@ print_count (notmuch_database_t *notmuch, const char *query_str,
case OUTPUT_FILES:
count = count_files (query);
if (count >= 0) {
- printf ("%u", count);
+ printf ("%d", count);
} else {
ret = -1;
goto DONE;
diff --git notmuch-new.c notmuch-new.c
index 4d40f3d0..3a60f7ca 100644
--- notmuch-new.c
+++ notmuch-new.c
@@ -131,10 +131,10 @@ generic_print_progress (const char *action, const char *object,
elapsed_overall = notmuch_time_elapsed (tv_start, tv_now);
rate_overall = processed / elapsed_overall;
- printf ("%s %d ", action, processed);
+ printf ("%s %u ", action, processed);
if (total) {
- printf ("of %d %s", total, object);
+ printf ("of %u %s", total, object);
if (processed > 0 && elapsed_overall > 0.5) {
double time_remaining = ((total - processed) / rate_overall);
printf (" (");
diff --git notmuch-reply.c notmuch-reply.c
index b88f1d31..e6c16641 100644
--- notmuch-reply.c
+++ notmuch-reply.c
@@ -635,7 +635,7 @@ static int do_reply(notmuch_config_t *config,
return 1;
if (count != 1) {
- fprintf (stderr, "Error: search term did not match precisely one message (matched %d messages).\n", count);
+ fprintf (stderr, "Error: search term did not match precisely one message (matched %u messages).\n", count);
return 1;
}
diff --git notmuch-show.c notmuch-show.c
index accea48a..3ce4b63c 100644
--- notmuch-show.c
+++ notmuch-show.c
@@ -902,7 +902,7 @@ do_show_single (void *ctx,
return 1;
if (count != 1) {
- fprintf (stderr, "Error: search term did not match precisely one message (matched %d messages).\n", count);
+ fprintf (stderr, "Error: search term did not match precisely one message (matched %u messages).\n", count);
return 1;
}
--
2.11.0
next prev parent reply other threads:[~2017-06-16 22:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-16 22:50 [PATCH 1/5] minor whitespace cleanups Piotr Trojanek
2017-06-16 22:50 ` [PATCH 2/5] add leaks due to missing invocations of va_end Piotr Trojanek
2017-06-16 22:50 ` [PATCH 3/5] remove ineffective assignments Piotr Trojanek
2017-08-20 13:56 ` Jani Nikula
2017-06-16 22:50 ` Piotr Trojanek [this message]
2017-06-21 16:11 ` [PATCH 4/5] fix wrong printf formatting of signed/unsigned integers Daniel Kahn Gillmor
2017-06-26 12:14 ` Piotr Trojanek
2017-06-26 13:04 ` David Bremner
2017-06-26 22:54 ` David Bremner
2017-06-25 12:57 ` David Bremner
2017-06-16 22:50 ` [PATCH 5/5] flag potential problems with FIXME Piotr Trojanek
2017-06-25 12:34 ` [PATCH 1/5] minor whitespace cleanups 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=20170616225026.8098-4-piotr.trojanek@gmail.com \
--to=piotr.trojanek@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).