X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-new.c;h=3a60f7cae47fee568d8002f5db178b6ea7587d7a;hp=13212639cc8ec669df4ea3d47f6c0d4d9a3fd834;hb=85c830405886207196aedbd0a2b757b227ba769d;hpb=3f5257cec271c05d82f8fda129066e9f285689f5 diff --git a/notmuch-new.c b/notmuch-new.c index 13212639..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 (" ("); @@ -850,7 +850,7 @@ _remove_directory (void *ctx, const char *path, add_files_state_t *add_files_state) { - notmuch_status_t status = NOTMUCH_STATUS_SUCCESS; + notmuch_status_t status; notmuch_directory_t *directory; notmuch_filenames_t *files, *subdirs; char *absolute; @@ -905,10 +905,9 @@ print_results (const add_files_state_t *state) state->processed_files == 1 ? "file" : "total files"); notmuch_time_print_formatted_seconds (elapsed); if (elapsed > 1) - printf (" (%d files/sec.).\033[K\n", + printf (" (%d files/sec.)", (int) (state->processed_files / elapsed)); - else - printf (".\033[K\n"); + printf (".%s\n", (state->output_is_a_tty) ? "\033[K" : ""); } if (state->added_messages)