]> git.notmuchmail.org Git - notmuch/commitdiff
fix wrong printf formatting of signed/unsigned integers
authorPiotr Trojanek <piotr.trojanek@gmail.com>
Fri, 16 Jun 2017 22:50:25 +0000 (23:50 +0100)
committerDavid Bremner <david@tethera.net>
Sun, 25 Jun 2017 12:39:35 +0000 (09:39 -0300)
notmuch-count.c
notmuch-new.c
notmuch-reply.c
notmuch-show.c

index a05b430d77ac8df14db982cc533c87b7e4f40886..50b0c193f04625c794b9ab9287ab6bdd9c4f29da 100644 (file)
@@ -111,7 +111,7 @@ print_count (notmuch_database_t *notmuch, const char *query_str,
     case OUTPUT_FILES:
        count = count_files (query);
        if (count >= 0) {
     case OUTPUT_FILES:
        count = count_files (query);
        if (count >= 0) {
-           printf ("%u", count);
+           printf ("%d", count);
        } else {
            ret = -1;
            goto DONE;
        } else {
            ret = -1;
            goto DONE;
index 4d40f3d08e31fb2fe5c1553586a4b8033fd5cd00..3a60f7cae47fee568d8002f5db178b6ea7587d7a 100644 (file)
@@ -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;
 
     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) {
 
     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 (" (");
        if (processed > 0 && elapsed_overall > 0.5) {
            double time_remaining = ((total - processed) / rate_overall);
            printf (" (");
index b88f1d31347dc058eacfd5c447c3918c9e7a0952..e6c166414f1a72c376911b4e4dae63e26250e519 100644 (file)
@@ -635,7 +635,7 @@ static int do_reply(notmuch_config_t *config,
            return 1;
 
        if (count != 1) {
            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;
        }
 
            return 1;
        }
 
index accea48a194a00a1fced46fef95ab54f263681c4..3ce4b63cf5046492ab39ebf5ee865ecd72bb785b 100644 (file)
@@ -902,7 +902,7 @@ do_show_single (void *ctx,
        return 1;
 
     if (count != 1) {
        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;
     }
 
        return 1;
     }