Re: [PATCH v2 1/3] src/*: Fix an error for the loop initialization declaration

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On Mon, Apr 26, 2021 at 02:23:05PM +0800, Yang Xu wrote:
> When compile them on old gcc, get the following error
> mount-idmapped.c: In function 'parse_map':
> mount-idmapped.c:154:2: error: 'for' loop initial declarations are only allowed in C99 mode
>   for (int i = 0; i < 2; i++) {
> 
> Fix them by declaring them at the beginning instead of in loop.
> 
> Signed-off-by: Yang Xu <xuyang2018.jy@xxxxxxxxxxx>
> ---

2021 and we still can't use for-loop initial declarations, _sigh_.
Reviewed-by: Christian Brauner <christian.brauner@xxxxxxxxxx>



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux