Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

af_llc: fix if-statement empty body warning

When debugging via dprintk() is not enabled, make the dprintk()
macro be an empty do-while loop, as is done in
<linux/sunrpc/debug.h>.

This fixes a gcc warning when -Wextra is set:
../net/llc/af_llc.c:974:51: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]

I have verified that there is not object code change (with gcc 7.5.0).

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Randy Dunlap and committed by
David S. Miller
c535f920 165b94ff

+1 -1
+1 -1
net/llc/af_llc.c
··· 47 47 #if 0 48 48 #define dprintk(args...) printk(KERN_DEBUG args) 49 49 #else 50 - #define dprintk(args...) 50 + #define dprintk(args...) do {} while (0) 51 51 #endif 52 52 53 53 /* Maybe we'll add some more in the future. */