From: Randy Dunlap Date: Wed, 26 Feb 2020 05:08:52 +0000 (-0800) Subject: af_llc: fix if-statement empty body warning X-Git-Tag: v5.7-rc1~146^2~314 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c535f9203209be19b60421b363b0bb2c7e90f298;p=users%2Fjedix%2Flinux-maple.git 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 . 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 Cc: netdev@vger.kernel.org Cc: "David S. Miller" Signed-off-by: David S. Miller --- diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c index 2922d4150d88..54fb8d452a7b 100644 --- a/net/llc/af_llc.c +++ b/net/llc/af_llc.c @@ -47,7 +47,7 @@ static int llc_ui_wait_for_busy_core(struct sock *sk, long timeout); #if 0 #define dprintk(args...) printk(KERN_DEBUG args) #else -#define dprintk(args...) +#define dprintk(args...) do {} while (0) #endif /* Maybe we'll add some more in the future. */