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-next>] [day] [month] [year] [list]
Date:   Wed, 10 Oct 2018 16:27:58 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     "Theodore Ts'o" <tytso@....edu>,
        Andreas Dilger <adilger.kernel@...ger.ca>
Cc:     Arnd Bergmann <arnd@...db.de>, Jan Kara <jack@...e.cz>,
        Eric Biggers <ebiggers@...gle.com>, linux-ext4@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH] ext4: avoid unused variable warning

The two new variables are only used in an #ifdef, so they cause a
warning without CONFIG_QUOTA:

fs/ext4/super.c: In function 'parse_options':
fs/ext4/super.c:1977:26: error: unused variable 'grp_qf_name' [-Werror=unused-variable]
  char *p, *usr_qf_name, *grp_qf_name;
                          ^~~~~~~~~~~
fs/ext4/super.c:1977:12: error: unused variable 'usr_qf_name' [-Werror=unused-variable]
  char *p, *usr_qf_name, *grp_qf_name;

Fixes: 20cefcdc2040 ("ext4: fix use-after-free race in ext4_remount()'s error path")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 fs/ext4/super.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index e9ca8312457b..d60199510c94 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1974,7 +1974,10 @@ static int parse_options(char *options, struct super_block *sb,
 			 int is_remount)
 {
 	struct ext4_sb_info *sbi = EXT4_SB(sb);
-	char *p, *usr_qf_name, *grp_qf_name;
+	char *p;
+#ifdef CONFIG_QUOTA
+	char *usr_qf_name, *grp_qf_name;
+#endif
 	substring_t args[MAX_OPT_ARGS];
 	int token;
 
-- 
2.18.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ