Re: [PATCH][2.6.14-rc2] ext3: fix build warning if !quota

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jerome Pinot <[email protected]> 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 <[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)
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux