2.6.30-rc2: format warning in fs/reiserfs/procfs.o
CC [M] fs/reiserfs/procfs.o/home/bor/src/linux-git/fs/reiserfs/procfs.c: In function 'show_journal':/home/bor/src/linux-git/fs/reiserfs/procfs.c:393: warning: format '%u' expects type 'unsigned int', but argument 22 has type 'long unsigned int'
LD [M] fs/reiserfs/reiserfs.o
Argument 22 is journal->j_last_flush_trans_id. As far as I can tell in all contexts where it is used it is assigned unsigned int (and journal->trans_id itself is unsigned int as well). So is this patch appropriate? It compiles cleanly, but I am a bit scared to test it on my sole root reiserfs :)
--
Subject: [PATCH] reiserfs: Make j_last_flush_trans_id unsigned int
From: Andrey Borzenkov <[email protected]>
j_last_flush_trans_id is always assigned unsigned int value; so make it unsigned int as well. It also removes this warning:
CC [M] fs/reiserfs/procfs.o/home/bor/src/linux-git/fs/reiserfs/procfs.c: In function 'show_journal':/home/bor/src/linux-git/fs/reiserfs/procfs.c:393: warning: format '%u' expects type 'unsigned int', but argument 22 has type 'long unsigned int'
---
include/linux/reiserfs_fs_sb.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/linux/reiserfs_fs_sb.h +0 -0
@@ -193,7 +193,7 @@ struct reiserfs_journal {atomic_t j_wcount;/* count of writers for current commit */ unsigned long j_bcount;/* batch count. allows turning X transactions
into 1 */
unsigned long j_first_unflushed_offset; /* first unflushed transactions
offset */
- unsigned long j_last_flush_trans_id; /* last fully flushed journal
timestamp */
+ unsigned int j_last_flush_trans_id; /* last fully flushed journal
timestamp */
struct buffer_head *j_header_bh;
time_t j_trans_start_time; /* time this transaction started */