Skip to content

Commit d577632

Browse files
author
Joel Becker
committed
ocfs2: Avoid a gcc warning in ocfs2_wipe_inode().
gcc warns that a variable is uninitialized. It's actually handled, but an early return fools gcc. Let's just initialize the variable to a garbage value that will crash if the usage is ever broken. Signed-off-by: Joel Becker <joel.becker@oracle.com>
1 parent 6b933c8 commit d577632

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎fs/ocfs2/inode.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ static void ocfs2_signal_wipe_completion(struct ocfs2_super *osb,
725725
static int ocfs2_wipe_inode(struct inode *inode,
726726
struct buffer_head *di_bh)
727727
{
728-
int status, orphaned_slot;
728+
int status, orphaned_slot = -1;
729729
struct inode *orphan_dir_inode = NULL;
730730
struct buffer_head *orphan_dir_bh = NULL;
731731
struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);

0 commit comments

Comments
 (0)