Skip to contentSkip to conversation

xfstests: fix a compile warning at seek_sanity_test.c

PATCH In review Jeff Liu 2 participants 6 messages Jun 2, 2012 – Sep 24, 2012

lore
Share & tools
lore

Jeff Liu

author
#0 lore raw

PATCH 1/1 xfstests: fix a compile warning at seek_sanity_test.c

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.

---
 src/seek_sanity_test.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
src/seek_sanity_test.c +4 -2
index a185e54..34f5508 100644
@@ -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)
Signature · 6 lines
1.7.9

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Jeff Liu

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.

Sorry, looks like this clean-up patch has not been committed yet.

Looks good.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

author
#2 lore raw
Quoted 9 lines · Mark Tinguely
Quoted 8 lines · Jeff Liu

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.

Quoted 7 lines
Quoted 1 line

Sorry, looks like this clean-up patch has not been committed yet.

Looks good.

Could you please also consider another patch for 286 improvements at:
http://patchwork.xfs.org/patch/3731

Thanks,
-Jeff

Quoted 5 lines

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#3 lore raw
Quoted 17 lines · Jeff Liu
Quoted 15 lines · Mark Tinguely
Quoted 9 lines · Jeff Liu

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.

Sorry, looks like this clean-up patch has not been committed yet.

Looks good.

Quoted 9 lines
Quoted 1 line

Could you please also consider another patch for 286 improvements at:
http://patchwork.xfs.org/patch/3731

Thanks,
-Jeff

Yes, I will make sure it gets committed; it has been already reviewed.

Did I remember correctly that there is plans for another test for the latest kernel features?

--Mark.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

author
#4 lore raw
Quoted 24 lines · Mark Tinguely
Quoted 23 lines · Jeff Liu
Quoted 9 lines · Mark Tinguely
Quoted 8 lines · Jeff Liu

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.

Quoted 7 lines
Quoted 1 line

Sorry, looks like this clean-up patch has not been committed yet.

Looks good.

Could you please also consider another patch for 286 improvements at:
http://patchwork.xfs.org/patch/3731

Quoted 8 lines
Quoted 3 lines

Thanks,
-Jeff

Yes, I will make sure it gets committed; it has been already reviewed.

Did I remember correctly that there is plans for another test for the latest kernel features?

Yes, we have discussed that before, however, I thought it was your idea so I have not work it out. :)

I'll write if you have no time to do it.

-Jeff

Quoted 7 lines

--Mark.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#5 lore raw
In reply to Jeff Liu
Quoted 10 lines · Jeff Liu

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.

---

Committed to git://oss.sgi.com/xfs/cmds/xfstests.git, master branch.

--Mark.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs