lkml.org 
[lkml]   [2022]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] xfs: fix for variable set but not used warning
On Tue, Jul 12, 2022 at 08:38:52PM +0800, sunliming wrote:
> Fix below kernel warning:
>
> fs/xfs/scrub/repair.c:539:19: warning: variable 'agno' set but not used [-Wunused-but-set-variable]
>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: sunliming <sunliming@kylinos.cn>
> ---
> fs/xfs/scrub/repair.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/fs/xfs/scrub/repair.c b/fs/xfs/scrub/repair.c
> index a02ec8fbc8ac..2c8d7e7ef9af 100644
> --- a/fs/xfs/scrub/repair.c
> +++ b/fs/xfs/scrub/repair.c
> @@ -533,14 +533,11 @@ xrep_reap_block(
> {
> struct xfs_btree_cur *cur;
> struct xfs_buf *agf_bp = NULL;
> - xfs_agnumber_t agno;
> xfs_agblock_t agbno;
> bool has_other_rmap;
> int error;
>
> - agno = XFS_FSB_TO_AGNO(sc->mp, fsbno);
> agbno = XFS_FSB_TO_AGBNO(sc->mp, fsbno);
> - ASSERT(agno == sc->sa.pag->pag_agno);

...by removing debugging assertions? IDGI, why wouldn't you change the
assertion?

--D

>
> /*
> * If we are repairing per-inode metadata, we need to read in the AGF
> --
> 2.25.1
>

\
 
 \ /
  Last update: 2022-07-12 17:37    [W:0.306 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site