From: Arnd Bergmann <arnd@kernel.org>
To: Jan Harkes <jaharkes@cs.cmu.edu>, coda@cs.cmu.edu
Cc: Arnd Bergmann <arnd@arndb.de>,
codalist@coda.cs.cmu.edu, linux-kernel@vger.kernel.org
Subject: [PATCH] coda: avoid Wunused-but-set-variable warning
Date: Fri, 22 Mar 2024 14:22:26 +0100 [thread overview]
Message-ID: <20240322132234.906977-1-arnd@kernel.org> (raw)
From: Arnd Bergmann <arnd@arndb.de>
The UPARG() macro implicitly sets the outp variable, but a lot of the
callers never actually use the results instead, causing a W=1 warning:
fs/coda/upcall.c:115:27: error: variable 'outp' set but not used [-Werror,-Wunused-but-set-variable]
115 | union outputArgs *outp;
| ^
Add a cast to void to shut up that warning for callers that don't
care bout the output.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
fs/coda/upcall.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/coda/upcall.c b/fs/coda/upcall.c
index cd6a3721f6f6..b7451fdef14d 100644
--- a/fs/coda/upcall.c
+++ b/fs/coda/upcall.c
@@ -63,6 +63,7 @@ do {\
inp = (union inputArgs *)alloc_upcall(op, insize); \
if (IS_ERR(inp)) { return PTR_ERR(inp); }\
outp = (union outputArgs *)(inp); \
+ (void)outp; \
outsize = insize; \
} while (0)
--
2.39.2
reply other threads:[~2024-03-22 13:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20240322132234.906977-1-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=arnd@arndb.de \
--cc=coda@cs.cmu.edu \
--cc=codalist@coda.cs.cmu.edu \
--cc=jaharkes@cs.cmu.edu \
--cc=linux-kernel@vger.kernel.org \
/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