From: Richard Kettlewell Date: Thu, 21 Feb 2013 19:50:00 +0000 (+0000) Subject: Fix printf field width types X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=56ea167c3ba7f30dd179c442257716da9b8b0b6e;p=vbig.git Fix printf field width types --- diff --git a/vbig.cc b/vbig.cc index a71a42d..0e621f3 100644 --- a/vbig.cc +++ b/vbig.cc @@ -239,7 +239,7 @@ static void flushstdout() { static void clearprogress() { if (!progress) return; - printf(" %-10s %*s \r", "", sizeof(long long)*4, ""); + printf(" %-10s %*s \r", "", (int)sizeof(long long)*4, ""); flushstdout(); } @@ -253,7 +253,7 @@ static void showprogress(long long amount, const char *show) { int triples = sizeof(amount); char rawbuf[triples*3 + 1]; char outbuf[triples*4 + 1]; - snprintf(rawbuf, sizeof(rawbuf), "% *lld", sizeof(rawbuf)-1, amount); + snprintf(rawbuf, sizeof(rawbuf), "% *lld", (int)sizeof(rawbuf)-1, amount); for (int i=0; i