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

atm: nicstar: fix if-statement empty body warning

When debugging via PRINTK() is not enabled, make the PRINTK()
macro be an empty do-while block.

Thix fixes a gcc warning when -Wextra is set:
../drivers/atm/nicstar.c:1819:23: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]

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

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Chas Williams <3chas3@gmail.com>
Cc: linux-atm-general@lists.sourceforge.net
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
8a171c5c 84b32680

+1 -1
+1 -1
drivers/atm/nicstar.c
··· 91 91 #ifdef GENERAL_DEBUG 92 92 #define PRINTK(args...) printk(args) 93 93 #else 94 - #define PRINTK(args...) 94 + #define PRINTK(args...) do {} while (0) 95 95 #endif /* GENERAL_DEBUG */ 96 96 97 97 #ifdef EXTRA_DEBUG