Doug Ledford: super-ddf: fix compile warnings on ppc64

Martin F. Krafft madduck at alioth.debian.org
Thu May 7 12:11:38 UTC 2009


Module: mdadm
Branch: debian/experimental
Commit: c9b6907ba0de7812139cad2dac2c13545810713f
URL:    http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=c9b6907ba0de7812139cad2dac2c13545810713f

Author: Doug Ledford <dledford at redhat.com>
Date:   Wed Apr  8 17:25:52 2009 +1000

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 <dledford at redhat.com>
Signed-off-by: NeilBrown <neilb at suse.de>

---

 super-ddf.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/super-ddf.c b/super-ddf.c
index 93c8f06..d22c88c 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);




More information about the pkg-mdadm-commits mailing list