Messages in this thread Patch in this message | | | Subject | Re: [PATCH][2.6.14-rc2] ext3: fix build warning if !quota | From | OGAWA Hirofumi <> | Date | Fri, 30 Sep 2005 01:45:49 +0900 |
| |
Jerome Pinot <ngc891@gmail.com> writes:
> 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. -- OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> ---
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) _ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |