public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Jerome Pinot <ngc891@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH][2.6.14-rc2] ext3: fix build warning if !quota
Date: Fri, 30 Sep 2005 01:45:49 +0900	[thread overview]
Message-ID: <8764sju8jm.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <88ee31b7050928174557572f77@mail.gmail.com> (Jerome Pinot's message of "Thu, 29 Sep 2005 09:45:22 +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)
_

       reply	other threads:[~2005-09-29 16:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <88ee31b7050928174557572f77@mail.gmail.com>
2005-09-29 16:45 ` OGAWA Hirofumi [this message]
2005-09-29  2:24 [PATCH][2.6.14-rc2] ext3: fix build warning if !quota pinotj
2005-09-29 10:10 ` Jan Kara
  -- strict thread matches above, loose matches on Subject: below --
2005-09-29  1:46 pinotj
2005-09-29  1:57 ` Al Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8764sju8jm.fsf@devron.myhome.or.jp \
    --to=hirofumi@mail.parknet.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ngc891@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox