]> granicus.if.org Git - neomutt/commitdiff
Fix type mismatch in mutt_progress_init()
authorJakub Wilk <jwilk@jwilk.net>
Thu, 14 Dec 2017 15:23:38 +0000 (16:23 +0100)
committerRichard Russon <rich@flatcap.org>
Thu, 14 Dec 2017 17:27:40 +0000 (17:27 +0000)
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

index 773fd80ebe69a7e905a532a435ea62db7a4e82e5..285c80454bbb963df206bf9755e29442f370e2fa 100644 (file)
@@ -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)
   {