[PATCH] EXT3 compiler warning fix

From: dhowells
Date: Mon Nov 08 2004 - 09:41:29 EST


The attached patch fixes an uninitialised variable warning in ext3. The
compiler is wrong in this case because it can't analyse the code sufficiently.

Signed-Off-By: dhowells@xxxxxxxxxx
---
diffstat ext3-2610rc1mm3.diff
balloc.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)

diff -uNrp /warthog/kernels/linux-2.6.10-rc1-mm3/fs/ext3/balloc.c linux-2.6.10-rc1-mm3-frv/fs/ext3/balloc.c
--- /warthog/kernels/linux-2.6.10-rc1-mm3/fs/ext3/balloc.c 2004-11-05 13:15:39.000000000 +0000
+++ linux-2.6.10-rc1-mm3-frv/fs/ext3/balloc.c 2004-11-05 14:13:03.775506583 +0000
@@ -194,8 +194,7 @@ static struct reserve_window_node *searc
if (!n)
return NULL;

- while (n)
- {
+ do {
rsv = rb_entry(n, struct reserve_window_node, rsv_node);

if (goal < rsv->rsv_start)
@@ -204,7 +203,7 @@ static struct reserve_window_node *searc
n = n->rb_right;
else
return rsv;
- }
+ } while (n);
/*
* We've fallen off the end of the tree: the goal wasn't inside
* any particular node. OK, the previous node must be to one
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/