Skip to contentSkip to conversation

nilfs2: fix format string compile warning (ino_t)

PATCH Applied Heiko Carstens 2 participants 2 messages Sep 3, 2009 – Sep 4, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nilfs2: fix format string compile warning (ino_t)

From: Heiko Carstens <[email protected]>

Unlike on most other architectures ino_t is an unsigned int on s390. So add an explicit cast to avoid this compile warning:

fs/nilfs2/recovery.c: In function 'recover_dsync_blocks':
fs/nilfs2/recovery.c:555: warning: format '%lu' expects type 'long unsigned int', but argument 3 has type 'ino_t'

---

Patch applies on top of linux-next.

 fs/nilfs2/recovery.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/nilfs2/recovery.c +2 -1
Index: linux-next/fs/nilfs2/recovery.c
===================================================================
@@ -552,7 +552,8 @@ static int recover_dsync_blocks(struct n
 		printk(KERN_WARNING
 		       "NILFS warning: error recovering data block "
 		       "(err=%d, ino=%lu, block-offset=%llu)\n",
-		       err, rb->ino, (unsigned long long)rb->blkoff);
+		       err, (unsigned long)rb->ino,
+		       (unsigned long long)rb->blkoff);
 		if (!err2)
 			err2 = err;
  next:
#1 lore raw
Quoted 5 lines · Heiko Carstens

From: Heiko Carstens <[email protected]>

Unlike on most other architectures ino_t is an unsigned int on s390. So add an explicit cast to avoid this compile warning:

Quoted 7 lines

fs/nilfs2/recovery.c: In function 'recover_dsync_blocks':
fs/nilfs2/recovery.c:555: warning: format '%lu' expects type 'long unsigned int', but argument 3 has type 'ino_t'

---

Patch applies on top of linux-next.

Applied, thanks!

Ryusuke Konishi

Quoted 18 lines
 fs/nilfs2/recovery.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-next/fs/nilfs2/recovery.c
===================================================================

fs/nilfs2/recovery.c +2 -2
@@ -552,7 +552,8 @@ static int recover_dsync_blocks(struct n
 		printk(KERN_WARNING
 		       "NILFS warning: error recovering data block "
 		       "(err=%d, ino=%lu, block-offset=%llu)\n",
-		       err, rb->ino, (unsigned long long)rb->blkoff);
+		       err, (unsigned long)rb->ino,
+		       (unsigned long long)rb->blkoff);
 		if (!err2)
 			err2 = err;
  next:
--