From 56ea167c3ba7f30dd179c442257716da9b8b0b6e Mon Sep 17 00:00:00 2001 From: Richard Kettlewell Date: Thu, 21 Feb 2013 19:50:00 +0000 Subject: [PATCH] Fix printf field width types --- vbig.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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