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-prev] [day] [month] [year] [list]
Date:	Tue, 8 Jan 2013 16:28:16 -0500
From:	"J. Bruce Fields" <bfields@...ldses.org>
To:	Russell King <rmk@....linux.org.uk>
Cc:	"J. Bruce Fields" <bfields@...hat.com>, linux-nfs@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: Commit 7032a3dd9 (svcrpc: demote some printks to a dprintk) adds
 warnings

On Tue, Jan 08, 2013 at 12:13:00PM +0000, Russell King wrote:
> Bruce,
> 
> Your commit below causes a new build warning in the kernel:
> 
> net/sunrpc/svc.c: In function 'svc_printk':
> net/sunrpc/svc.c:1050:7: warning: unused variable 'buf'
> 
> which affects all ARM builds; it is the only warning in a lot of cases.
> Please can you resolve this new warning using whatever method you feel
> is most appropriate, thanks.

Bah, these "unused variable" warnings for buffers unused in the
!RPC_DEBUG case keep popping up.

I guess I'll commit the following for 3.9.

--b.

commit 31e815406973ef86e2e42a36086d65afb8f4e396
Author: J. Bruce Fields <bfields@...hat.com>
Date:   Tue Jan 8 16:22:15 2013 -0500

    svcrpc: silence "unused variable" warning in !RPC_DEBUG case
    
    Signed-off-by: J. Bruce Fields <bfields@...hat.com>

diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index dbf12ac..b9ba2a8 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -1042,6 +1042,7 @@ static void svc_unregister(const struct svc_serv *serv, struct net *net)
 /*
  * dprintk the given error with the address of the client that caused it.
  */
+#ifdef RPC_DEBUG
 static __printf(2, 3)
 void svc_printk(struct svc_rqst *rqstp, const char *fmt, ...)
 {
@@ -1058,6 +1059,9 @@ void svc_printk(struct svc_rqst *rqstp, const char *fmt, ...)
 
 	va_end(args);
 }
+#else
+static __printf(2,3) void svc_printk(struct svc_rqst *rqstp, const char *fmt, ...) {}
+#endif
 
 /*
  * Common routine for processing the RPC request.
--
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