aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Trojanek <piotr.trojanek@gmail.com>2017-06-16 23:50:25 +0100
committerDavid Bremner <david@tethera.net>2017-06-25 09:39:35 -0300
commit85c830405886207196aedbd0a2b757b227ba769d (patch)
treecdcf550a58d7e07a3b7a3ee8a42179f526cfe973
parent410b96080ceec15ced70e684115f604380c5b4f6 (diff)
fix wrong printf formatting of signed/unsigned integers
-rw-r--r--notmuch-count.c2
-rw-r--r--notmuch-new.c4
-rw-r--r--notmuch-reply.c2
-rw-r--r--notmuch-show.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/notmuch-count.c b/notmuch-count.c
index a05b430d..50b0c193 100644
--- a/notmuch-count.c
+++ b/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 a/notmuch-new.c b/notmuch-new.c
index 4d40f3d0..3a60f7ca 100644
--- a/notmuch-new.c
+++ b/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 a/notmuch-reply.c b/notmuch-reply.c
index b88f1d31..e6c16641 100644
--- a/notmuch-reply.c
+++ b/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 a/notmuch-show.c b/notmuch-show.c
index accea48a..3ce4b63c 100644
--- a/notmuch-show.c
+++ b/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;
}