From: Jean Sacren <sakiwit@gmail.com>
To: Linux BTRFS Filesystem Discussion <linux-btrfs@vger.kernel.org>
Subject: [PATCH 1/1] btrfs: Fix warning: 'prev' may be used uninitialized in this function
Date: Sat, 11 Sep 2010 00:10:23 -0600 [thread overview]
Message-ID: <20100911061023.GA18545@mail.gmail.com> (raw)
In-Reply-To: <20100911060848.GA18516@mail.gmail.com>
warning: 'prev' may be used uninitialized in this function
Initialize the variable 'prev' to NULL so that gcc doesn't complain.
Signed-off-by: Jean Sacren <sakiwit@gmail.com>
---
fs/btrfs/ordered-data.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c
index e56c72b..fad2616 100644
--- a/fs/btrfs/ordered-data.c
+++ b/fs/btrfs/ordered-data.c
@@ -141,7 +141,7 @@ static inline struct rb_node *tree_search(struct btrfs_ordered_inode_tree *tree,
u64 file_offset)
{
struct rb_root *root = &tree->tree;
- struct rb_node *prev;
+ struct rb_node *prev = NULL;
struct rb_node *ret;
struct btrfs_ordered_extent *entry;
--
1.7.1
prev parent reply other threads:[~2010-09-11 6:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-11 6:08 [PATCH 0/1] btrfs: Fix warning: 'prev' may be used uninitialized in this function Jean Sacren
2010-09-11 6:10 ` Jean Sacren [this message]
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=20100911061023.GA18545@mail.gmail.com \
--to=sakiwit@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
/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.