From: Chris Mason <chris.mason@oracle.com>
To: dave <dave@jikos.cz>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
linux-next <linux-next@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Miao Xie <miaox@cn.fujitsu.com>,
Tsutomu Itoh <t-itoh@jp.fujitsu.com>,
Itaru Kitayama <kitayama@cl.bb4u.ne.jp>,
linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] btrfs: fix uninitialized variable warning
Date: Fri, 03 Jun 2011 10:56:18 -0400 [thread overview]
Message-ID: <1307112880-sup-4802@shiny> (raw)
In-Reply-To: <20110603145014.GU12709@twin.jikos.cz>
Excerpts from David Sterba's message of 2011-06-03 10:50:14 -0400:
> From: David Sterba <dsterba@suse.cz>
>
> With Linus' tree, today's linux-next build (powercp ppc64_defconfig)
> produced this warning:
>
> fs/btrfs/delayed-inode.c: In function 'btrfs_delayed_update_inode':
> fs/btrfs/delayed-inode.c:1598:6: warning: 'ret' may be used
> uninitialized in this function
>
> Introduced by commit 16cdcec736cd ("btrfs: implement delayed inode items
> operation").
>
> This fixes a bug in btrfs_update_inode(): if the returned value from
> btrfs_delayed_update_inode is a nonzero garbage, inode stat data are not
> updated and several call paths may hit a BUG_ON or fail with strange
> code.
Ugh, thanks! It looks like the gcc uninit stuff isn't as verbose as it
used to be, but it does catch a bunch of allocated/set but not used
vars.
I have a nitems = 0 fix in my tree as well.
-chris
next prev parent reply other threads:[~2011-06-03 14:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-03 1:00 linux-next: build warning from Linus' tree Stephen Rothwell
2011-06-03 14:50 ` [PATCH] btrfs: fix uninitialized variable warning David Sterba
2011-06-03 14:56 ` Chris Mason [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-03-24 2:08 Genjian
2023-03-24 2:24 ` Qu Wenruo
2023-03-24 2:29 ` David Sterba
2023-03-24 3:05 ` genjian zhang
2023-03-24 4:24 ` Qu Wenruo
2023-03-24 5:47 ` genjian zhang
2023-04-06 19:12 ` David Sterba
2023-04-23 9:21 ` genjian zhang
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=1307112880-sup-4802@shiny \
--to=chris.mason@oracle.com \
--cc=dave@jikos.cz \
--cc=kitayama@cl.bb4u.ne.jp \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=miaox@cn.fujitsu.com \
--cc=sfr@canb.auug.org.au \
--cc=t-itoh@jp.fujitsu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.