netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: xfs-masters@oss.sgi.com, Thomas Gleixner <tglx@linutronix.de>,
	Dave Airlie <airlied@linux.ie>,
	netdev@vger.kernel.org, linux-arm-kernel@lists.arm.linux.org.uk,
	Herbert Xu <herbert@gon
Subject: Re: [xfs-masters] linux-next: arm allmodconfig
Date: Wed, 29 Oct 2008 09:24:59 +0100	[thread overview]
Message-ID: <20081029082459.GA6364@elte.hu> (raw)
In-Reply-To: <20081029074032.GI4985@disturbed>


* Dave Chinner <david@fromorbit.com> wrote:

> > > fs/xfs/xfs_rtalloc.c: In function `xfs_growfs_rt':
> > > fs/xfs/xfs_rtalloc.c:1875: warning: 'tp' might be used uninitialized in this function
> 
> False positive, and I don't get this reported, either.
> 
> Hold on - the above gcc binary only emits a warning for the 
> xfs_growfs_rt issue when CONFIG_CC_OPTIMIZE_FOR_SIZE=y is set. It 
> still doesn't catch the quota bug, though. This is so fucked up....

FYI, i've got 3 XFS warnings mapped in tip/auto-warnings-next:

 earth4:~/tip> gll linus..auto-warnings-next | grep xfs

 ec2f37c: work around warning in fs/xfs/xfs_mount.c
 8501db3: work around warning in fs/xfs/xfs_rtalloc.c
 8077af8: warnings: fix xfs posix acl

you can find those commits in the auto-warnings-next branch of -tip:

  http://people.redhat.com/mingo/tip.git/README

the rtalloc annotation is below. I went through the flow and the code 
seems to be correct and GCC is wrong.

	Ingo

------------->
From 8501db35588df4f35d67d8ba207422006a214ae7 Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu>
Date: Mon, 18 Aug 2008 15:21:19 +0200
Subject: [PATCH] work around warning in fs/xfs/xfs_rtalloc.c
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

fix warning:

  fs/xfs/xfs_rtalloc.c: In function ‘xfs_growfs_rt’:
  fs/xfs/xfs_rtalloc.c:1875: warning: ‘tp’ may be used uninitialized in this function

This is a spurious gcc warning - it does not realize the correct/bug-free
flow of logic regarding the 'error' and 'tp' variables.

No code changed:
   7c10fd959065115c8e252ff5a861a01e  xfs_rtalloc.o.before.asm
   7c10fd959065115c8e252ff5a861a01e  xfs_rtalloc.o.after.asm

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 fs/xfs/xfs_rtalloc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
index e2f68de..fe5de08 100644
--- a/fs/xfs/xfs_rtalloc.c
+++ b/fs/xfs/xfs_rtalloc.c
@@ -1872,7 +1872,7 @@ xfs_growfs_rt(
 	xfs_extlen_t	rsumblocks;	/* current number of rt summary blks */
 	xfs_sb_t	*sbp;		/* old superblock */
 	xfs_fsblock_t	sumbno;		/* summary block number */
-	xfs_trans_t	*tp;		/* transaction pointer */
+	xfs_trans_t	*uninitialized_var(tp);	/* transaction pointer */
 
 	sbp = &mp->m_sb;
 	cancelflags = 0;

  reply	other threads:[~2008-10-29  8:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-29  0:56 linux-next: arm allmodconfig Andrew Morton
2008-10-29  7:12 ` Takashi Iwai
2008-10-29  7:40 ` [xfs-masters] " Dave Chinner
2008-10-29  8:24   ` Ingo Molnar [this message]
2008-10-29 22:07     ` [xfs-masters] " Dave Chinner
2008-10-29  9:40 ` Russell King - ARM Linux
2008-10-29 16:05   ` Tony Lindgren
2008-10-29 10:16 ` Pekka J Enberg
2008-10-29 13:53 ` Paul Moore
2008-10-29 20:12   ` Paul Moore

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=20081029082459.GA6364@elte.hu \
    --to=mingo@elte.hu \
    --cc=airlied@linux.ie \
    --cc=herbert@gon \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=xfs-masters@oss.sgi.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;
as well as URLs for NNTP newsgroup(s).