From: Doug Ledford Date: Wed, 8 Apr 2009 07:25:52 +0000 (+1000) Subject: super-ddf: fix compile warnings on ppc64 X-Git-Tag: mdadm-3.0-rc1~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9b6907ba0de7812139cad2dac2c13545810713f;p=thirdparty%2Fmdadm.git super-ddf: fix compile warnings on ppc64 Simple patch to silence some compile warnings that only show up on 64bit arches. Signed-off-by: Doug Ledford Signed-off-by: NeilBrown --- diff --git a/super-ddf.c b/super-ddf.c index 93c8f06d..d22c88c7 100644 --- a/super-ddf.c +++ b/super-ddf.c @@ -1061,9 +1061,9 @@ static void examine_vd(int n, struct ddf_super *sb, char *guid) map_num(ddf_sec_level, vc->srl) ?: "-unknown-"); } printf(" Device Size[%d] : %llu\n", n, - __be64_to_cpu(vc->blocks)/2); + (unsigned long long)__be64_to_cpu(vc->blocks)/2); printf(" Array Size[%d] : %llu\n", n, - __be64_to_cpu(vc->array_blocks)/2); + (unsigned long long)__be64_to_cpu(vc->array_blocks)/2); } } @@ -1110,7 +1110,8 @@ static void examine_pds(struct ddf_super *sb) //printf("\n"); printf(" %3d %08x ", i, __be32_to_cpu(pd->refnum)); - printf("%8lluK ", __be64_to_cpu(pd->config_size)>>1); + printf("%8lluK ", + (unsigned long long)__be64_to_cpu(pd->config_size)>>1); for (dl = sb->dlist; dl ; dl = dl->next) { if (dl->disk.refnum == pd->refnum) { char *dv = map_dev(dl->major, dl->minor, 0);