From: Frank Morales II <altf2o@gmail.com>
To: chris.mason@oracle.com, josef@redhat.com, zheng.yan@oracle.com,
jens.axboe@oracle.com, tj@kernel.org
Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] fs/btrfs/ordered-data.c: fixed compiler warnings for using uninitialized variable
Date: Fri, 10 Sep 2010 07:42:04 -0700 [thread overview]
Message-ID: <1284129724.23418.27.camel@ubuntu1004pl> (raw)
>From 1c304defc543738f82ccb18fe10b558dd2098d74 Mon Sep 17 00:00:00 2001
From: Frank Morales II <altf2o@gmail.com>
Date: Fri, 10 Sep 2010 07:34:23 -0700
Subject: [PATCH] fs/btrfs/ordered-data.c: fixed compiler warnings for using uninitialized variable
In the function tree_search, the variable prev was used without first
being initialized, causing compiler warning messages. Initializing
prev to NULL resolved the issue.
Kernal patched against: 2.6.36-rc3 (df423dc7)
Signed-off-by: Frank Morales II <altf2o@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.0.4
next reply other threads:[~2010-09-10 14:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-10 14:42 Frank Morales II [this message]
2010-09-12 10:36 ` [PATCH] fs/btrfs/ordered-data.c: fixed compiler warnings for using uninitialized variable Felipe Contreras
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=1284129724.23418.27.camel@ubuntu1004pl \
--to=altf2o@gmail.com \
--cc=chris.mason@oracle.com \
--cc=jens.axboe@oracle.com \
--cc=josef@redhat.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
--cc=zheng.yan@oracle.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).