summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-02-21 08:57:45 +0100
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-02-22 00:42:29 +0100
commit5216a8e70e25b01cbd2915cd0442fb96deb2c262 (patch)
treef372bd3cb3fc2f4a2d3e4ad303e6c4d3f8f48865 /fs/nfs
parentnfs: fix sparse warnings (diff)
downloadlinux-5216a8e70e25b01cbd2915cd0442fb96deb2c262.tar.xz
linux-5216a8e70e25b01cbd2915cd0442fb96deb2c262.zip
Wrap buffers used for rpc debug printks into RPC_IFDEBUG
Sorry for the noise, but here's the v3 of this compilation fix :) There are some places, which declare the char buf[...] on the stack to push it later into dprintk(). Since the dprintk sometimes (if the CONFIG_SYSCTL=n) becomes an empty do { } while (0) stub, these buffers cause gcc to produce appropriate warnings. Wrap these buffers with RPC_IFDEBUG macro, as Trond proposed, to compile them out when not needed. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/callback.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c
index 0d784f6f609f..66648dd92d97 100644
--- a/fs/nfs/callback.c
+++ b/fs/nfs/callback.c
@@ -172,7 +172,7 @@ void nfs_callback_down(void)
static int nfs_callback_authenticate(struct svc_rqst *rqstp)
{
struct nfs_client *clp;
- char buf[RPC_MAX_ADDRBUFLEN];
+ RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]);
/* Don't talk to strangers */
clp = nfs_find_client(svc_addr(rqstp), 4);