Re: [PATCH] ext4: Fix unused iterator variable warnings

From: Theodore Ts'o
Date: Fri Apr 28 2023 - 00:01:10 EST


On Thu, Apr 20, 2023 at 09:51:24AM -0700, Nathan Chancellor wrote:
>
> The kernel has updated to gnu11, allowing the variables to be declared
> within the for loop. Do so to clear up the warnings.

This is OK for this patch, since it's fixing a patch that landed
during this merge window, and it's unlikely this cause problems with
any future security patches that will need to be backported into 5.15,
5.10, etc. --- or result in patch conflicts that will be any worse
than what we already have.

However, for anything that might be something that needs to be
backported into LTS kernels, or be in code that might get be involved
with a LTS backport patch, let's not use any C11/GNU11 whenever
possible.

- Ted