[Ocfs2-tools-devel] [PATCH 7/7] console: Suppress build warnings

Sunil Mushran sunil.mushran at oracle.com
Tue Jun 3 14:46:44 PDT 2008


From: Tao Ma <tao.ma at oracle.com>

This patch silences the following warning:
ocfs2module.c:179: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 4 has type ‘__u64’

This patch silences the build warning by casting the argument as uint64_t.

Signed-off-by: Tao Ma <tao.ma at oracle.com>
Signed-off-by: Sunil Mushran <sunil.mushran at oracle.com>
---
 ocfs2console/ocfs2interface/ocfs2module.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ocfs2console/ocfs2interface/ocfs2module.c b/ocfs2console/ocfs2interface/ocfs2module.c
index 9a4815c..bd3139d 100644
--- a/ocfs2console/ocfs2interface/ocfs2module.c
+++ b/ocfs2console/ocfs2interface/ocfs2module.c
@@ -176,7 +176,7 @@ dinode_repr (DInode *self)
 {
   char blkno[32];
 
-  snprintf (blkno, sizeof (blkno), "%"PRIu64, self->dinode.i_blkno);
+  snprintf (blkno, sizeof (blkno), "%"PRIu64, (uint64_t)self->dinode.i_blkno);
   return PyString_FromFormat ("<ocfs2.DInode %s on %s>", blkno,
 			      PyString_AS_STRING (self->fs_obj->device));
 }
-- 
1.5.3.6




More information about the Ocfs2-tools-devel mailing list