lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 6 Sep 2021 08:19:38 +0900
From:   Austin Kim <austindh.kim@...il.com>
To:     "Theodore Y. Ts'o" <tytso@....edu>, adilger.kernel@...ger.ca
Cc:     linux-ext4@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        김동현 <austin.kim@....com>
Subject: Re: [PATCH] ext4: remove an unused variable warning with CONFIG_QUOTA=n

2021년 8월 24일 (화) 오후 12:49, Austin Kim <austindh.kim@...il.com>님이 작성:
>
> The 'enable_quota' variable is only used in an CONFIG_QUOTA.
> With CONFIG_QUOTA=n, compiler causes a harmless warning:
>
> fs/ext4/super.c: In function ‘ext4_remount’:
> fs/ext4/super.c:5840:6: warning: variable ‘enable_quota’ set but not used
>   [-Wunused-but-set-variable]
>   int enable_quota = 0;
>               ^~~~~
>
> Move 'enable_quota' into the same #ifdef CONFIG_QUOTA block
> to remove an unused variable warning.
>
> Signed-off-by: Austin Kim <austindh.kim@...il.com>
> ---
>  fs/ext4/super.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 6b03e4281f6f..6adb570f4b31 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -5845,10 +5845,10 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
>         struct ext4_sb_info *sbi = EXT4_SB(sb);
>         unsigned long old_sb_flags, vfs_flags;
>         struct ext4_mount_options old_opts;
> -       int enable_quota = 0;
>         ext4_group_t g;
>         int err = 0;
>  #ifdef CONFIG_QUOTA
> +       int enable_quota = 0;
>         int i, j;
>         char *to_free[EXT4_MAXQUOTAS];
>  #endif
> @@ -6053,7 +6053,9 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
>                                         err = -EROFS;
>                                         goto restore_opts;
>                                 }
> +#ifdef CONFIG_QUOTA
>                         enable_quota = 1;
> +#endif
>                 }
>         }
>
> --
> 2.20.1
>

If you are available, would you please review this patch?
It will not take long.

BR,
Austin Kim

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ