* [PATCH] ext4: fix build warning
@ 2008-11-23 10:40 Wu Fengguang
2008-11-25 22:26 ` Theodore Tso
0 siblings, 1 reply; 2+ messages in thread
From: Wu Fengguang @ 2008-11-23 10:40 UTC (permalink / raw)
To: linux-ext4@vger.kernel.org
Replace `if' with `goto' to assure gcc that ix has been initialized.
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
---
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index ea2ce3c..885645e 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -1160,15 +1160,14 @@ ext4_ext_search_right(struct inode *inode, struct ext4_ext_path *path,
while (--depth >= 0) {
ix = path[depth].p_idx;
if (ix != EXT_LAST_INDEX(path[depth].p_hdr))
- break;
+ goto got_index;
}
- if (depth < 0) {
- /* we've gone up to the root and
- * found no index to the right */
- return 0;
- }
+ /* we've gone up to the root and
+ * found no index to the right */
+ return 0;
+got_index:
/* we've found index to the right, let's
* follow it and find the closest allocated
* block to the right */
@@ -1201,7 +1200,6 @@ ext4_ext_search_right(struct inode *inode, struct ext4_ext_path *path,
*phys = ext_pblock(ex);
put_bh(bh);
return 0;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ext4: fix build warning
2008-11-23 10:40 [PATCH] ext4: fix build warning Wu Fengguang
@ 2008-11-25 22:26 ` Theodore Tso
0 siblings, 0 replies; 2+ messages in thread
From: Theodore Tso @ 2008-11-25 22:26 UTC (permalink / raw)
To: Wu Fengguang; +Cc: linux-ext4@vger.kernel.org
On Sun, Nov 23, 2008 at 06:40:06PM +0800, Wu Fengguang wrote:
> Replace `if' with `goto' to assure gcc that ix has been initialized.
It's really sad that we need to do this.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
- Ted
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-11-25 22:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-23 10:40 [PATCH] ext4: fix build warning Wu Fengguang
2008-11-25 22:26 ` Theodore Tso
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).