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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20240322132234.906977-1-arnd@kernel.org>
Date: Fri, 22 Mar 2024 14:22:26 +0100
From: Arnd Bergmann <arnd@...nel.org>
To: Jan Harkes <jaharkes@...cmu.edu>,
	coda@...cmu.edu
Cc: Arnd Bergmann <arnd@...db.de>,
	codalist@...a.cs.cmu.edu,
	linux-kernel@...r.kernel.org
Subject: [PATCH] coda: avoid Wunused-but-set-variable warning

From: Arnd Bergmann <arnd@...db.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@...db.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ