From c7d12ab106cc62cb22e73cf216131d2f2fd9897b Mon Sep 17 00:00:00 2001 From: Jakub Wilk Date: Thu, 14 Dec 2017 16:23:38 +0100 Subject: [PATCH] Fix type mismatch in mutt_progress_init() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes the following GCC warning: curs_lib.c: In function ‘mutt_progress_init’: curs_lib.c:471:65: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘size_t {aka unsigned int}’ [-Wformat=] snprintf(progress->sizestr, sizeof(progress->sizestr), "%ld", progress->size); ^ --- curs_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curs_lib.c b/curs_lib.c index 773fd80eb..285c80454 100644 --- a/curs_lib.c +++ b/curs_lib.c @@ -468,7 +468,7 @@ void mutt_progress_init(struct Progress *progress, const char *msg, if (progress->flags & MUTT_PROGRESS_SIZE) mutt_pretty_size(progress->sizestr, sizeof(progress->sizestr), progress->size); else - snprintf(progress->sizestr, sizeof(progress->sizestr), "%ld", progress->size); + snprintf(progress->sizestr, sizeof(progress->sizestr), "%zu", progress->size); } if (!inc) { -- 2.40.0