lkml.org 
[lkml]   [2021]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH -next] xfs: Fix -Wunused-variable warning
From
Date
PLS ignore this.

On 2021/6/11 19:59, YueHaibing wrote:
> If DEBUG is n, gcc warns:
>
> fs/xfs/libxfs/xfs_ialloc.c:2032:20: warning: unused variable ‘agi’ [-Wunused-variable]
>
> Move it info #ifdef block to fix this.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> fs/xfs/libxfs/xfs_ialloc.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/xfs/libxfs/xfs_ialloc.c b/fs/xfs/libxfs/xfs_ialloc.c
> index 2ed6de6faf8a..a9973edd3c0a 100644
> --- a/fs/xfs/libxfs/xfs_ialloc.c
> +++ b/fs/xfs/libxfs/xfs_ialloc.c
> @@ -2029,7 +2029,9 @@ xfs_difree_finobt(
> xfs_agino_t agino,
> struct xfs_inobt_rec_incore *ibtrec) /* inobt record */
> {
> +#ifdef DEBUG
> struct xfs_agi *agi = agbp->b_addr;
> +#endif
> struct xfs_btree_cur *cur;
> struct xfs_inobt_rec_incore rec;
> int offset = agino - ibtrec->ir_startino;
>

\
 
 \ /
  Last update: 2021-06-11 14:11    [W:0.049 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site