From: Dave Chinner <david@fromorbit.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: xfs-masters@oss.sgi.com, linux-next@vger.kernel.org,
linux-kernel@vger.kernel.org, xfs@oss.sgi.com, aelder@sgi.com
Subject: [PATCH] Re: linux-next: build warning after merge of the xfs tree
Date: Thu, 4 Mar 2010 11:57:09 +1100 [thread overview]
Message-ID: <20100304005709.GE14317@discord.disaster> (raw)
In-Reply-To: <20100304111930.86f7cc62.sfr@canb.auug.org.au>
On Thu, Mar 04, 2010 at 11:19:30AM +1100, Stephen Rothwell wrote:
> Hi Dave,
>
> After merging the xfs tree, today's linux-next build (x86_64 allmodconfig)
> produced this warning:
>
> fs/xfs/linux-2.6/xfs_aops.c: In function 'xfs_end_io':
> fs/xfs/linux-2.6/xfs_aops.c:232: warning: 'error' may be used uninitialized in this function
>
> Introduced by commit 77d7a0c2eeb285c9069e15396703d0cb9690ac50 ("xfs:
> Non-blocking inode locking in IO completion").
>
> I can't tell if this is a false positive. If the first two "if"
> statement bodies are skipped, then error is tested uninitialised. It is
> possible that at least one of them has to be executed.
Right, there is a warning being generated there - I thought I fixed
that immediately after posting the first version of the patch. The
second version:
http://oss.sgi.com/archives/xfs/2010-02/msg00340.html
definitely had it fixed.
Alex, can you make sure you take the entire patch rather than
cutting and pasting bits from one patch version to another? That
way you don't miss small changes to the patch that might have been
forgotten about....
Stephen, the patch below should fix the warning.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
xfs: fix uninitialised variable warning in xfs_end_io
Signed-off-by: Dave Chinner <david@fromorbit.com>
---
fs/xfs/linux-2.6/xfs_aops.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c
index f41a2d8..8989c16 100644
--- a/fs/xfs/linux-2.6/xfs_aops.c
+++ b/fs/xfs/linux-2.6/xfs_aops.c
@@ -230,7 +230,7 @@ xfs_end_io(
{
xfs_ioend_t *ioend = container_of(work, xfs_ioend_t, io_work);
struct xfs_inode *ip = XFS_I(ioend->io_inode);
- int error;
+ int error = 0;
/*
* For unwritten extents we need to issue transactions to convert a
next prev parent reply other threads:[~2010-03-04 0:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-04 0:19 linux-next: build warning after merge of the xfs tree Stephen Rothwell
2010-03-04 0:57 ` Dave Chinner [this message]
2010-03-04 4:54 ` [PATCH] " Alex Elder
2010-03-04 16:24 ` Alex Elder
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=20100304005709.GE14317@discord.disaster \
--to=david@fromorbit.com \
--cc=aelder@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=xfs-masters@oss.sgi.com \
--cc=xfs@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