[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6de68c52-b391-6b79-20eb-9ae7fe40e28a@huawei.com>
Date: Fri, 21 Apr 2023 15:37:08 +0800
From: Jason Yan <yanaijie@...wei.com>
To: Arnd Bergmann <arnd@...nel.org>, Theodore Ts'o <tytso@....edu>,
Andreas Dilger <adilger.kernel@...ger.ca>
CC: Arnd Bergmann <arnd@...db.de>, Jan Kara <jack@...e.cz>,
Ritesh Harjani <ritesh.list@...il.com>,
Eric Biggers <ebiggers@...gle.com>,
Ye Bin <yebin10@...wei.com>, Baokun Li <libaokun1@...wei.com>,
<linux-ext4@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ext4: avoid unused-variable warning with CONFIG_QUOTA=n
Hi Arnd,
On 2023/4/21 15:08, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
>
> After some code reshuffling, the index variables in two functions
> are only used in an #ifdef:
>
> fs/ext4/super.c: In function 'ext4_put_super':
> fs/ext4/super.c:1262:13: error: unused variable 'i' [-Werror=unused-variable]
> fs/ext4/super.c: In function '__ext4_fill_super':
> fs/ext4/super.c:5200:22: error: unused variable 'i' [-Werror=unused-variable]
>
> Since all supported compilers now allow having variable declarations
> inside of a for() loop, move them into the #ifdef block directly.
>
> Fixes: dcbf87589d90 ("ext4: factor out ext4_flex_groups_free()")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
> fs/ext4/super.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
Thanks for the patch. But Nathan has already sent a patch to fix this.
http://patchwork.ozlabs.org/project/linux-ext4/patch/20230420-ext4-unused-variables-super-c-v1-1-138b6db6c21c@kernel.org/
Jason
Powered by blists - more mailing lists