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>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 14 Jul 2014 12:38:49 +0200
From:	Thierry Reding <thierry.reding@...il.com>
To:	Steve French <sfrench@...ba.org>
Cc:	Sachin Prabhu <sprabhu@...hat.com>, linux-cifs@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] fs/cifs: Fix build warnings

From: Thierry Reding <treding@...dia.com>

The sess_alloc_buffer(), sess_free_buffer(), sess_establish_session()
and sess_sendreceive() functions are only used by sess_auth_lanman(),
therefore should be guarded by the same #ifdef to prevent the following
compiler warnings:

	fs/cifs/sess.c:542:1: warning: 'sess_alloc_buffer' defined but not used [-Wunused-function]
	 sess_alloc_buffer(struct sess_data *sess_data, int wct)
	 ^
	fs/cifs/sess.c:580:1: warning: 'sess_free_buffer' defined but not used [-Wunused-function]
	 sess_free_buffer(struct sess_data *sess_data)
	 ^
	fs/cifs/sess.c:589:1: warning: 'sess_establish_session' defined but not used [-Wunused-function]
	 sess_establish_session(struct sess_data *sess_data)
	 ^
	fs/cifs/sess.c:621:1: warning: 'sess_sendreceive' defined but not used [-Wunused-function]
	 sess_sendreceive(struct sess_data *sess_data)
	 ^

Signed-off-by: Thierry Reding <treding@...dia.com>
---
 fs/cifs/sess.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index db6ecdf0974c..5fb7606b81ef 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -538,6 +538,7 @@ struct sess_data {
 	struct kvec iov[3];
 };
 
+#ifdef CONFIG_CIFS_WEAK_PW_HASH
 static int
 sess_alloc_buffer(struct sess_data *sess_data, int wct)
 {
@@ -644,7 +645,6 @@ sess_sendreceive(struct sess_data *sess_data)
  * in proc/fs/cifs or via mount parm.  Unfortunately this is
  * needed for old Win (e.g. Win95), some obscure NAS and OS/2
  */
-#ifdef CONFIG_CIFS_WEAK_PW_HASH
 static void
 sess_auth_lanman(struct sess_data *sess_data)
 {
-- 
2.0.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ