From patchwork Sun Nov 23 10:40:06 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kbuild test robot X-Patchwork-Id: 10294 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id D1EF1DDDDF for ; Sun, 23 Nov 2008 21:40:41 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756147AbYKWKkX (ORCPT ); Sun, 23 Nov 2008 05:40:23 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756374AbYKWKkX (ORCPT ); Sun, 23 Nov 2008 05:40:23 -0500 Received: from mga03.intel.com ([143.182.124.21]:36124 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756147AbYKWKkV (ORCPT ); Sun, 23 Nov 2008 05:40:21 -0500 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 23 Nov 2008 02:40:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.33,653,1220252400"; d="scan'208";a="81063714" Received: from unknown (HELO localhost) ([10.254.153.155]) by azsmga001.ch.intel.com with ESMTP; 23 Nov 2008 02:40:15 -0800 Received: from wfg by localhost with local (Exim 4.69) (envelope-from ) id 1L4CNq-0003Uk-Bg for linux-ext4@vger.kernel.org; Sun, 23 Nov 2008 18:40:06 +0800 Date: Sun, 23 Nov 2008 18:40:06 +0800 From: Wu Fengguang To: "linux-ext4@vger.kernel.org" Subject: [PATCH] ext4: fix build warning Message-ID: <20081123104006.GA13392@localhost> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Replace `if' with `goto' to assure gcc that ix has been initialized. Signed-off-by: Wu Fengguang Signed-off-by: "Theodore Ts'o" --- -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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; - } /*