Joseph Qi
2019-Aug-22 01:07 UTC
[Ocfs2-devel] [PATCH 3/3] fs/ocfs2/dir.c: remove set but not used variables
On 19/8/21 21:15, zhengbin wrote:> Fixes gcc '-Wunused-but-set-variable' warning: > > fs/ocfs2/dir.c: In function ocfs2_dx_dir_transfer_leaf: > fs/ocfs2/dir.c:3653:42: warning: variable new_list 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/dir.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c > index 784426d..bdef72c 100644 > --- a/fs/ocfs2/dir.c > +++ b/fs/ocfs2/dir.c > @@ -3636,7 +3636,7 @@ static void ocfs2_dx_dir_transfer_leaf(struct inode *dir, u32 split_hash, > int i, j, num_used; > u32 major_hash; > struct ocfs2_dx_leaf *orig_dx_leaf, *new_dx_leaf; > - struct ocfs2_dx_entry_list *orig_list, *new_list, *tmp_list; > + struct ocfs2_dx_entry_list *orig_list, *tmp_list; > struct ocfs2_dx_entry *dx_entry; > > tmp_list = &tmp_dx_leaf->dl_list; > @@ -3645,7 +3645,6 @@ static void ocfs2_dx_dir_transfer_leaf(struct inode *dir, u32 split_hash, > orig_dx_leaf = (struct ocfs2_dx_leaf *) orig_dx_leaves[i]->b_data; > orig_list = &orig_dx_leaf->dl_list; > new_dx_leaf = (struct ocfs2_dx_leaf *) new_dx_leaves[i]->b_data; > - new_list = &new_dx_leaf->dl_list; > > num_used = le16_to_cpu(orig_list->de_num_used); > > -- > 2.7.4 >
Changwei Ge
2019-Aug-22 06:01 UTC
[Ocfs2-devel] [PATCH 3/3] fs/ocfs2/dir.c: remove set but not used variables
On 2019/8/22 9:07 ??, Joseph Qi wrote:> > On 19/8/21 21:15, zhengbin wrote: >> Fixes gcc '-Wunused-but-set-variable' warning: >> >> fs/ocfs2/dir.c: In function ocfs2_dx_dir_transfer_leaf: >> fs/ocfs2/dir.c:3653:42: warning: variable new_list 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/dir.c | 3 +-- >> 1 file changed, 1 insertion(+), 2 deletions(-) >> >> diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c >> index 784426d..bdef72c 100644 >> --- a/fs/ocfs2/dir.c >> +++ b/fs/ocfs2/dir.c >> @@ -3636,7 +3636,7 @@ static void ocfs2_dx_dir_transfer_leaf(struct inode *dir, u32 split_hash, >> int i, j, num_used; >> u32 major_hash; >> struct ocfs2_dx_leaf *orig_dx_leaf, *new_dx_leaf; >> - struct ocfs2_dx_entry_list *orig_list, *new_list, *tmp_list; >> + struct ocfs2_dx_entry_list *orig_list, *tmp_list; >> struct ocfs2_dx_entry *dx_entry; >> >> tmp_list = &tmp_dx_leaf->dl_list; >> @@ -3645,7 +3645,6 @@ static void ocfs2_dx_dir_transfer_leaf(struct inode *dir, u32 split_hash, >> orig_dx_leaf = (struct ocfs2_dx_leaf *) orig_dx_leaves[i]->b_data; >> orig_list = &orig_dx_leaf->dl_list; >> new_dx_leaf = (struct ocfs2_dx_leaf *) new_dx_leaves[i]->b_data; >> - new_list = &new_dx_leaf->dl_list; >> >> num_used = le16_to_cpu(orig_list->de_num_used); >> >> -- >> 2.7.4 >> > _______________________________________________ > Ocfs2-devel mailing list > Ocfs2-devel at oss.oracle.com > https://oss.oracle.com/mailman/listinfo/ocfs2-devel