* [PATCH] ext3: Fix warning without quota support (was: Linux 2.6.14)
2005-10-28 0:28 Linux 2.6.14 Linus Torvalds
@ 2005-10-28 16:49 ` Jean Delvare
0 siblings, 0 replies; 4+ messages in thread
From: Jean Delvare @ 2005-10-28 16:49 UTC (permalink / raw)
To: LKML; +Cc: Stephen Tweedie
Sorry for not spotting this one earlier...
Fix the following warning when ext3 fs is compiled without quota
support:
fs/ext3/super.c: In function `ext3_show_options':
fs/ext3/super.c:516: warning: unused variable `sbi'
Signed-off-by: Jean Delvare <khali@linux-fr.org>
---
fs/ext3/super.c | 2 ++
1 file changed, 2 insertions(+)
--- linux-2.6.14.orig/fs/ext3/super.c 2005-10-28 18:25:56.000000000 +0200
+++ linux-2.6.14/fs/ext3/super.c 2005-10-28 18:38:36.000000000 +0200
@@ -513,7 +513,9 @@
static int ext3_show_options(struct seq_file *seq, struct vfsmount *vfs)
{
struct super_block *sb = vfs->mnt_sb;
+#ifdef 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");
--
Jean Delvare
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ext3: Fix warning without quota support (was: Linux 2.6.14)
@ 2005-11-12 14:12 Nick Warne
2005-11-12 15:31 ` Jean Delvare
0 siblings, 1 reply; 4+ messages in thread
From: Nick Warne @ 2005-11-12 14:12 UTC (permalink / raw)
To: Jean Delvare; +Cc: linux-kernel
> Sorry for not spotting this one earlier...
>
> Fix the following warning when ext3 fs is compiled without quota
> support:
>
> fs/ext3/super.c: In function `ext3_show_options':
> fs/ext3/super.c:516: warning: unused variable `sbi'
I have added this small fix to my 2.6.14.2 build. A quick question.
What does GCC do here - does it just drop and ignore the unused variable?
Nick
--
http://sourceforge.net/projects/quake2plus
"Person who say it cannot be done should not interrupt person doing it."
-Chinese Proverb
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ext3: Fix warning without quota support (was: Linux 2.6.14)
2005-11-12 14:12 [PATCH] ext3: Fix warning without quota support (was: Linux 2.6.14) Nick Warne
@ 2005-11-12 15:31 ` Jean Delvare
2005-11-12 15:58 ` Nick Warne
0 siblings, 1 reply; 4+ messages in thread
From: Jean Delvare @ 2005-11-12 15:31 UTC (permalink / raw)
To: Nick Warne; +Cc: LKML
Hi Nick,
> > Fix the following warning when ext3 fs is compiled without quota
> > support:
> >
> > fs/ext3/super.c: In function `ext3_show_options':
> > fs/ext3/super.c:516: warning: unused variable `sbi'
>
> I have added this small fix to my 2.6.14.2 build. A quick question.
Let is be noted that this warning was fixed in a completely different
way in Linus' tree already. My patch is not meant for -stable either,
as it doesn't fix any real problem.
> What does GCC do here - does it just drop and ignore the unused variable?
Without optimizations, gcc 3.3.6 keeps the variable although it won't
ever be used. With -O1 and above (including -Os) it drops the unused
variable.
--
Jean Delvare
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ext3: Fix warning without quota support (was: Linux 2.6.14)
2005-11-12 15:31 ` Jean Delvare
@ 2005-11-12 15:58 ` Nick Warne
0 siblings, 0 replies; 4+ messages in thread
From: Nick Warne @ 2005-11-12 15:58 UTC (permalink / raw)
To: Jean Delvare; +Cc: LKML
Hi Jean,
On Saturday 12 November 2005 15:31, Jean Delvare wrote:
> Hi Nick,
>
> > I have added this small fix to my 2.6.14.2 build. A quick question.
>
> Let is be noted that this warning was fixed in a completely different
> way in Linus' tree already. My patch is not meant for -stable either,
> as it doesn't fix any real problem.
I see (or didn't). Isn't it hard to keep up with all this. Kernel developers
are unstoppable... how Linus/Andrew/Alan/all_the_rest keep on top of it all I
don't know - wonderful stuff.
> > What does GCC do here - does it just drop and ignore the unused variable?
>
> Without optimizations, gcc 3.3.6 keeps the variable although it won't
> ever be used. With -O1 and above (including -Os) it drops the unused
> variable.
Thanks! I didn't know that at all.
Nick
--
http://sourceforge.net/projects/quake2plus
"Person who say it cannot be done should not interrupt person doing it."
-Chinese Proverb
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-11-12 15:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-12 14:12 [PATCH] ext3: Fix warning without quota support (was: Linux 2.6.14) Nick Warne
2005-11-12 15:31 ` Jean Delvare
2005-11-12 15:58 ` Nick Warne
-- strict thread matches above, loose matches on Subject: below --
2005-10-28 0:28 Linux 2.6.14 Linus Torvalds
2005-10-28 16:49 ` [PATCH] ext3: Fix warning without quota support (was: Linux 2.6.14) Jean Delvare
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox