Joseph Qi
2019-Aug-22 01:05 UTC
[Ocfs2-devel] [PATCH 1/3] fs/ocfs2/namei.c: remove set but not used variables
On 19/8/21 21:15, zhengbin wrote:> Fixes gcc '-Wunused-but-set-variable' warning: > > fs/ocfs2/namei.c: In function ocfs2_create_inode_in_orphan: > fs/ocfs2/namei.c:2503:23: warning: variable di set but not used [-Wunused-but-set-variable] > > Reported-by: Hulk Robot <hulkci at huawei.com> > Signed-off-by: zhengbin <zhengbin13 at huawei.com>Reviewed-by: Joseph Qi <joseph.qi at linux.alibaba.com>> --- > fs/ocfs2/namei.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c > index 6f8e1c4..8ea51cf 100644 > --- a/fs/ocfs2/namei.c > +++ b/fs/ocfs2/namei.c > @@ -2486,7 +2486,6 @@ int ocfs2_create_inode_in_orphan(struct inode *dir, > struct inode *inode = NULL; > struct inode *orphan_dir = NULL; > struct ocfs2_super *osb = OCFS2_SB(dir->i_sb); > - struct ocfs2_dinode *di = NULL; > handle_t *handle = NULL; > char orphan_name[OCFS2_ORPHAN_NAMELEN + 1]; > struct buffer_head *parent_di_bh = NULL; > @@ -2552,7 +2551,6 @@ int ocfs2_create_inode_in_orphan(struct inode *dir, > goto leave; > } > > - di = (struct ocfs2_dinode *)new_di_bh->b_data; > status = ocfs2_orphan_add(osb, handle, inode, new_di_bh, orphan_name, > &orphan_insert, orphan_dir, false); > if (status < 0) { > -- > 2.7.4 >
Changwei Ge
2019-Aug-22 06:00 UTC
[Ocfs2-devel] [PATCH 1/3] fs/ocfs2/namei.c: remove set but not used variables
On 2019/8/22 9:05 ??, Joseph Qi wrote:> > On 19/8/21 21:15, zhengbin wrote: >> Fixes gcc '-Wunused-but-set-variable' warning: >> >> fs/ocfs2/namei.c: In function ocfs2_create_inode_in_orphan: >> fs/ocfs2/namei.c:2503:23: warning: variable di set but not used [-Wunused-but-set-variable] >> >> Reported-by: Hulk Robot <hulkci at huawei.com> >> Signed-off-by: zhengbin <zhengbin13 at huawei.com> > Reviewed-by: Joseph Qi <joseph.qi at linux.alibaba.com>Reviewed-by: Changwei Ge <chge at linux.alibaba.com>>> --- >> fs/ocfs2/namei.c | 2 -- >> 1 file changed, 2 deletions(-) >> >> diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c >> index 6f8e1c4..8ea51cf 100644 >> --- a/fs/ocfs2/namei.c >> +++ b/fs/ocfs2/namei.c >> @@ -2486,7 +2486,6 @@ int ocfs2_create_inode_in_orphan(struct inode *dir, >> struct inode *inode = NULL; >> struct inode *orphan_dir = NULL; >> struct ocfs2_super *osb = OCFS2_SB(dir->i_sb); >> - struct ocfs2_dinode *di = NULL; >> handle_t *handle = NULL; >> char orphan_name[OCFS2_ORPHAN_NAMELEN + 1]; >> struct buffer_head *parent_di_bh = NULL; >> @@ -2552,7 +2551,6 @@ int ocfs2_create_inode_in_orphan(struct inode *dir, >> goto leave; >> } >> >> - di = (struct ocfs2_dinode *)new_di_bh->b_data; >> status = ocfs2_orphan_add(osb, handle, inode, new_di_bh, orphan_name, >> &orphan_insert, orphan_dir, false); >> if (status < 0) { >> -- >> 2.7.4 >> > _______________________________________________ > Ocfs2-devel mailing list > Ocfs2-devel at oss.oracle.com > https://oss.oracle.com/mailman/listinfo/ocfs2-devel