Thread (13 messages) flat view 13 messages, 5 authors, 2021-04-17

Re: [PATCH net-next 5/5] vxge: avoid -Wemtpy-body warnings

From: Arnd Bergmann <arnd@arndb.de>
Date: 2021-03-24 20:09:45
Also in: lkml

On Mon, Mar 22, 2021 at 11:43 AM Arnd Bergmann [off-list ref] wrote:
From: Arnd Bergmann <arnd@arndb.de>

There are a few warnings about empty debug macros in this driver:

drivers/net/ethernet/neterion/vxge/vxge-main.c: In function 'vxge_probe':
drivers/net/ethernet/neterion/vxge/vxge-main.c:4480:76: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
 4480 |                                 "Failed in enabling SRIOV mode: %d\n", ret);

Change them to proper 'do { } while (0)' expressions to make the
code a little more robust and avoid the warnings.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Please disregard this patch, I was accidentally building without -Wformat and
failed to notice that this introduces a regression. I'll send a new
version after
more testing.

       Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help