Re: [Qemu-devel] [PATCH 1/3] net: Drop unusual use of do { } while (0);

2017-11-30 Thread Thomas Huth
On 30.11.2017 14:41, Eric Blake wrote: > For a couple of macros in pcnet.c, we have to provide a new scope > to avoid compiler warnings about declarations in the middle of a > switch statement that aren't in a sub-scope. But use of > 'do { ... } while (0);' merely to provide that new scope is arca

[Qemu-devel] [PATCH 1/3] net: Drop unusual use of do { } while (0);

2017-11-30 Thread Eric Blake
For a couple of macros in pcnet.c, we have to provide a new scope to avoid compiler warnings about declarations in the middle of a switch statement that aren't in a sub-scope. But use of 'do { ... } while (0);' merely to provide that new scope is arcane overkill, compared to just using '{ ... }'.