From: Arnd Bergmann <arnd@arndb.de>
To: "Theodore Ts'o" <tytso@mit.edu>,
Andreas Dilger <adilger.kernel@dilger.ca>
Cc: Arnd Bergmann <arnd@arndb.de>, Jan Kara <jack@suse.cz>,
Eric Biggers <ebiggers@google.com>,
linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ext4: avoid unused variable warning
Date: Wed, 10 Oct 2018 16:27:58 +0200 [thread overview]
Message-ID: <20181010142813.1918180-1-arnd@arndb.de> (raw)
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@arndb.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
next reply other threads:[~2018-10-10 14:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-10 14:27 Arnd Bergmann [this message]
2018-10-10 19:26 ` [PATCH] ext4: avoid unused variable warning Theodore Y. Ts'o
2018-10-10 19:43 ` Miguel Ojeda
2018-10-10 19:43 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181010142813.1918180-1-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=adilger.kernel@dilger.ca \
--cc=ebiggers@google.com \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).