From mboxrd@z Thu Jan 1 00:00:00 1970 From: domen@coderock.org Subject: [patch 7/7] Fix misleading gcc4 warning: (160) offset and block may be used uninitialized in this function Date: Mon, 20 Jun 2005 23:57:06 +0200 Message-ID: <20050620215705.668687000@nd47.coderock.org> Cc: linux-fsdevel@vger.kernel.org, Jesse Millan , domen@coderock.org Return-path: Received: from coderock.org ([193.77.147.115]:24987 "EHLO trashy.coderock.org") by vger.kernel.org with ESMTP id S262277AbVFTWFS (ORCPT ); Mon, 20 Jun 2005 18:05:18 -0400 To: viro@parcelfarce.linux.theplanet.co.uk Content-Disposition: inline; filename=gcc4-fs_isofs_namei.c Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org From: Jesse Millan This warning appears to be a false alarm. This patch eliminates the warning that 'offset' and 'block' may be used uninitialized. The compiler does not like the conditional initialization of the two variables in the function isofs_find_entry(). In isofs_find_entry(), 'offset' and 'block' are referred to as 'block_rv' and 'offset_rv' respectively and are now initialized unconditionally to zero. Signed-off-by: Jesse Millan Signed-off-by: Domen Puncer --- namei.c | 2 ++ 1 files changed, 2 insertions(+) Index: quilt/fs/isofs/namei.c =================================================================== --- quilt.orig/fs/isofs/namei.c +++ quilt/fs/isofs/namei.c @@ -57,6 +57,8 @@ isofs_find_entry(struct inode *dir, stru unsigned long block, f_pos, offset, block_saved, offset_saved; struct buffer_head * bh = NULL; struct isofs_sb_info *sbi = ISOFS_SB(dir->i_sb); + *block_rv = 0; + *offset_rv = 0; if (!ISOFS_I(dir)->i_first_extent) return 0; --