ext3: fix build warning if !quota
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 4 lines · Jerome Pinot
sbi is not used if quota is not defined. This leads to a useless variable after preprocessing and a build warning.
This moves the declaration in right place.
Sorry, my fault. But we use -Wdeclaration-after-statement option. So, gcc-4.0.1 warns it, and gcc info says "not supported before GCC 3.0".
fs/ext3/super.c: In function 'ext3_show_options':fs/ext3/super.c:525: warning: ISO C90 forbids mixed declarations and code
How about this instead?
Thanks.
Signature · 23 lines
OGAWA Hirofumi <[email protected]> Signed-off-by: OGAWA Hirofumi <[email protected]> --- fs/ext3/super.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -puN fs/ext3/super.c~aaa fs/ext3/super.c --- linux-2.6.14-rc2-a/fs/ext3/super.c~aaa 2005-09-30 01:10:55.000000000 +0900 +++ linux-2.6.14-rc2-a-hirofumi/fs/ext3/super.c 2005-09-30 01:10:55.000000000 +0900 @@ -513,8 +513,9 @@ static void ext3_clear_inode(struct inod static int ext3_show_options(struct seq_file *seq, struct vfsmount *vfs) { struct super_block *sb = vfs->mnt_sb; +#if defined(CONFIG_QUOTA) struct ext3_sb_info *sbi = EXT3_SB(sb); - +#endif if (test_opt(sb, DATA_FLAGS) == EXT3_MOUNT_JOURNAL_DATA) seq_puts(seq, ",data=journal"); else if (test_opt(sb, DATA_FLAGS) == EXT3_MOUNT_ORDERED_DATA) _