SUNRPC: Kill compiler warning when RPC_DEBUG is unset
authorChuck Lever <chuck.lever@oracle.com>
Tue, 20 Mar 2012 23:20:53 +0000 (19:20 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 21 Mar 2012 13:31:31 +0000 (09:31 -0400)
Loads of these:

linux/net/sunrpc/rpcb_clnt.c:942:2: warning: suggest braces around
  empty body in ‘do’ statement [-Wempty-body]

show up when I unset CONFIG_PROC_SYSCTL.  Seen with

  gcc (GCC) 4.6.1 20110908 (Red Hat 4.6.1-9)

Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
include/linux/sunrpc/debug.h

index 9448eb5e426cb244c35f2adec7d0458673614609..a76cc20d98ce21531a6fcbd70e861bbfc5055c12 100644 (file)
@@ -74,8 +74,8 @@ extern unsigned int           nlm_debug;
 # define RPC_IFDEBUG(x)                x
 #else
 # define ifdebug(fac)          if (0)
-# define dfprintk(fac, args...)        do ; while (0)
-# define dfprintk_rcu(fac, args...)    do ; while (0)
+# define dfprintk(fac, args...)        do {} while (0)
+# define dfprintk_rcu(fac, args...)    do {} while (0)
 # define RPC_IFDEBUG(x)
 #endif