[Ocfs2-devel] [PATCH 15/30] ocfs2: build warnings fix

Mark Fasheh mark.fasheh at oracle.com
Thu Jan 17 14:35:41 PST 2008


Fix these types of warnings:

fs/ocfs2/resize.c: In function ‘ocfs2_group_extend’:
fs/ocfs2/resize.c:358: warning: format ‘%llu’ expects type ‘long long
unsigned int’, but argument 6 has type ‘long unsigned int’

u64 needs to be casted to unsigned long long when printing as %llu

Signed-off-by: Mark Fasheh <mark.fasheh at oracle.com>
---
 fs/ocfs2/resize.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/ocfs2/resize.c b/fs/ocfs2/resize.c
index ba305c1..84e06b6 100644
--- a/fs/ocfs2/resize.c
+++ b/fs/ocfs2/resize.c
@@ -356,7 +356,7 @@ int ocfs2_group_extend(struct inode * inode, int new_clusters)
 	}
 
 	mlog(0, "extend the last group at %llu, new clusters = %d\n",
-	     le64_to_cpu(group->bg_blkno), new_clusters);
+	     (unsigned long long)le64_to_cpu(group->bg_blkno), new_clusters);
 
 	handle = ocfs2_start_trans(osb, OCFS2_GROUP_EXTEND_CREDITS);
 	if (IS_ERR(handle)) {
@@ -547,7 +547,7 @@ int ocfs2_group_add(struct inode *inode, struct ocfs2_new_group_input *input)
 	ret = ocfs2_read_block(osb, input->group, &group_bh, 0, NULL);
 	if (ret < 0) {
 		mlog(ML_ERROR, "Can't read the group descriptor # %llu "
-		     "from the device.", input->group);
+		     "from the device.", (unsigned long long)input->group);
 		goto out;
 	}
 
@@ -560,7 +560,7 @@ int ocfs2_group_add(struct inode *inode, struct ocfs2_new_group_input *input)
 	}
 
 	mlog(0, "Add a new group  %llu in chain = %u, length = %u\n",
-	     input->group, input->chain, input->clusters);
+	     (unsigned long long)input->group, input->chain, input->clusters);
 
 	handle = ocfs2_start_trans(osb, OCFS2_GROUP_ADD_CREDITS);
 	if (IS_ERR(handle)) {
-- 
1.5.3.6




More information about the Ocfs2-devel mailing list