From: Austin Kim <hidden> Date: 2021-08-24 03:49:52
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 <redacted>
---
fs/ext4/super.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
From: Austin Kim <hidden> Date: 2021-09-05 23:19:51
2021년 8월 24일 (화) 오후 12:49, Austin Kim [off-list ref]님이 작성:
quoted hunk
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 <redacted>
---
fs/ext4/super.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
From: Jan Kara <jack@suse.cz> Date: 2021-10-14 09:26:09
On Tue 24-08-21 04:49:29, Austin Kim wrote:
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 <redacted>
I guess this has fallen through the cracks. The fix looks good to me. Feel
free to add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
On Tue, 24 Aug 2021 04:49:29 +0100, Austin Kim wrote:
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;
^~~~~
[...]
Applied, thanks!
[1/1] ext4: remove an unused variable warning with CONFIG_QUOTA=n
commit: d94ca0e1d65f4c274e3425a35f23ffe58ecea18a
Best regards,
--
Theodore Ts'o [off-list ref]