xfs
[Top] [All Lists]

[PATCH] xfstests: fix a compile warning at seek_sanity_test.c

To: xfs@xxxxxxxxxxx
Subject: [PATCH] xfstests: fix a compile warning at seek_sanity_test.c
From: Jeff Liu <jeff.liu@xxxxxxxxxx>
Date: Sat, 02 Jun 2012 22:33:06 +0800
Organization: Oracle
Reply-to: jeff.liu@xxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.28) Gecko/20120313 Thunderbird/3.1.20
Hello,

Compiler report warning at seek_sanity_test.c:
seek_sanity_test.c:46:3: warning: format '%lx' expects type 'long unsigned 
int', but argument 3 has type 'int'

Below patch can fix it.

Signed-off-by: Jie Liu <jeff.liu@xxxxxxxxxx>

---
 src/seek_sanity_test.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/seek_sanity_test.c b/src/seek_sanity_test.c
index a185e54..34f5508 100644
--- a/src/seek_sanity_test.c
+++ b/src/seek_sanity_test.c
@@ -42,8 +42,10 @@ static void get_file_system(int fd)
 {
        struct statfs buf;
 
-       if (!fstatfs(fd, &buf))
-               fprintf(stdout, "File system magic#: 0x%lx\n", buf.f_type);
+       if (!fstatfs(fd, &buf)) {
+               fprintf(stdout, "File system magic#: 0x%lx\n",
+                               (unsigned long int)buf.f_type);
+       }
 }
 
 static int get_io_sizes(int fd)
-- 
1.7.9

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] xfstests: fix a compile warning at seek_sanity_test.c, Jeff Liu <=