Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp522330pxj; Fri, 11 Jun 2021 05:13:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynvJQ4Yzhs2n6x6MGsQrrM+aeFpNh82JnENQ/VAqA7mP4XhLzpXS1ctMZ26ZWvIkRURz+c X-Received: by 2002:a17:906:6bc7:: with SMTP id t7mr3460280ejs.267.1623413589313; Fri, 11 Jun 2021 05:13:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623413589; cv=none; d=google.com; s=arc-20160816; b=ED0Zfr9cBC68rPuUxpf8q/8YhpfksApJN3QnuC10MFP5IDSo4Q3gFdwmM8eBWhoi3+ XDgHa1yfbdcm5hhkB6Mxy6HfCVXRUqy1SCW/9ry2e0sKDDOOpJrR7AJKSfm5asULJeXD pQB6zViQTIem1MqwgnupL5SHQx6yW3FLpVG5an3/YPM8dGZpOsf50nsfve6BIK/bpUqV f6rP12oTlRh7lsldHR5chPrfuu0q45IhBDkZ9B67DYmUv80fUNLwKvzxNh+Q5x2g9Ud0 138H9956GQ8g+01GJ14zWBiWIwm1Ifr3Kw2/MV5aTmOu9kt1X3um0OAibZyGGbSuFqI1 XEOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=Ka2vZI8BhY3gRLtUxlWlNVI6WRGKRKHdI3tQywTCaMY=; b=eUhz/eBrtcJODdWKw6P8qWOaHI74JesoSmXaqSi7KI2A+OYGswOP8BRWx1AiQWbA17 opeTYni8mrpKuOgxHQWHlczp2kMOk3VpZXRhqsVXPNx3ZKVKeB/5Qw8CjkeQNoVzPPj7 Cr14HT9JyEU6ufhpclH07hw/2xZ68j/mNTJwdtuMAUQ/VFHGSD1zAFQmzE2YVJ3RWZQi 7LltPWx6/TxlIAne5137sZ1/ZzN+vVoh6OiHChteWLoNTIRFaRC2aeCeKW3li+rBi1oz o5x6JXQg2E9i1bwPv7Lvv1qrLCkh0363GLKWzUrRLUXtcdzz/so8RAxSU4iCrCFpLajc Fw4A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n18si4762698eja.465.2021.06.11.05.12.46; Fri, 11 Jun 2021 05:13:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231187AbhFKMMg (ORCPT + 99 others); Fri, 11 Jun 2021 08:12:36 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:4038 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229785AbhFKMMd (ORCPT ); Fri, 11 Jun 2021 08:12:33 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4G1fgR0gFdzWtX7; Fri, 11 Jun 2021 20:05:39 +0800 (CST) Received: from dggema769-chm.china.huawei.com (10.1.198.211) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Fri, 11 Jun 2021 20:10:33 +0800 Received: from [10.174.179.215] (10.174.179.215) by dggema769-chm.china.huawei.com (10.1.198.211) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Fri, 11 Jun 2021 20:10:33 +0800 Subject: Re: [PATCH -next] xfs: Fix -Wunused-variable warning To: , , CC: References: <20210611115950.32588-1-yuehaibing@huawei.com> From: YueHaibing Message-ID: Date: Fri, 11 Jun 2021 20:10:32 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <20210611115950.32588-1-yuehaibing@huawei.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.179.215] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggema769-chm.china.huawei.com (10.1.198.211) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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; >