gfs2-utils: master - gfs2: Fix printf format errors on x86

Andrew Price andyp at fedoraproject.org
Fri Sep 11 10:42:42 UTC 2015


Gitweb:        http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=02fb346a1a3fc8cc9c1e4bd4eb2496bb618ffedf
Commit:        02fb346a1a3fc8cc9c1e4bd4eb2496bb618ffedf
Parent:        471bc208c8e29013b2abb66f36d6e6d9ef4e4337
Author:        Andreas Gruenbacher <andreas.gruenbacher at gmail.com>
AuthorDate:    Fri Sep 11 00:05:41 2015 +0200
Committer:     Andrew Price <anprice at redhat.com>
CommitterDate: Thu Sep 10 23:18:34 2015 +0100

gfs2: Fix printf format errors on x86

Signed-off-by: Andreas Gruenbacher <agruenba at redhat.com>
---
 gfs2/fsck/metawalk.c  |    2 +-
 gfs2/mkfs/main_grow.c |    5 +++--
 gfs2/mkfs/main_mkfs.c |    2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/gfs2/fsck/metawalk.c b/gfs2/fsck/metawalk.c
index 333bec6..9923d94 100644
--- a/gfs2/fsck/metawalk.c
+++ b/gfs2/fsck/metawalk.c
@@ -2080,7 +2080,7 @@ int write_new_leaf(struct gfs2_inode *dip, int start_lindex, int num_copies,
 		  "(0x%llx) at index: 0x%x for 0x%lx pointers.\n"),
 		(unsigned long long)dip->i_di.di_num.no_addr,
 		(unsigned long long)dip->i_di.di_num.no_addr,
-		start_lindex, pad_size / sizeof(uint64_t));
+		start_lindex, (unsigned long)pad_size / sizeof(uint64_t));
 	if (dip->i_sbd->gfs1)
 		count = gfs1_writei(dip, padbuf, start_lindex *
 				    sizeof(uint64_t), pad_size);
diff --git a/gfs2/mkfs/main_grow.c b/gfs2/mkfs/main_grow.c
index 4757ac7..860c319 100644
--- a/gfs2/mkfs/main_grow.c
+++ b/gfs2/mkfs/main_grow.c
@@ -269,7 +269,8 @@ static void fix_rindex(int rindex_fd, lgfs2_rgrps_t rgs, unsigned old_rg_count,
 		off_t rindex_size = lseek(rindex_fd, 0, SEEK_END);
 		if (rindex_size != old_rg_count * entrysize) {
 			log_crit(_("Incorrect rindex size. Want %ld (%d resource groups), have %ld\n"),
-				 (old_rg_count * entrysize), old_rg_count, rindex_size);
+				 (long)(old_rg_count * entrysize), old_rg_count,
+				 (long)rindex_size);
 			goto out;
 		}
 		/* Write the first entry separately to ensure there's enough
@@ -300,7 +301,7 @@ out:
 trunc:
 	count = (count / sizeof(struct gfs2_rindex)) + old_rg_count;
 	log_crit(_("truncating rindex to %ld entries\n"),
-		 (off_t)count * sizeof(struct gfs2_rindex));
+		 (long)count * sizeof(struct gfs2_rindex));
 	ftruncate(rindex_fd, (off_t)count * sizeof(struct gfs2_rindex));
 	free(buf);
 }
diff --git a/gfs2/mkfs/main_mkfs.c b/gfs2/mkfs/main_mkfs.c
index 3fab08c..d3d8edf 100644
--- a/gfs2/mkfs/main_mkfs.c
+++ b/gfs2/mkfs/main_mkfs.c
@@ -599,7 +599,7 @@ static lgfs2_rgrps_t rgs_init(struct mkfs_opts *opts, struct gfs2_sbd *sdp)
 	if (opts->debug) {
 		printf("  rgrp align = ");
 		if (opts->align)
-			printf("%lu+%lu blocks\n", al_base, al_off);
+			printf("%"PRIu64"+%"PRIu64" blocks\n", al_base, al_off);
 		else
 			printf("(disabled)\n");
 	}


More information about the cluster-commits mailing list