RE: [PATCH] target: pscsi: avoid Wempty-body warning

From: David Laight
Date: Tue Mar 23 2021 - 13:25:02 EST


..
> I totally agree with this one but usually it's already reported by
> another one (probably the one complaining about misindenting). The
> case I've seen quite a few times was:
>
> while (condition);
>
> At least I want the ';' on its own line to avoid it being
> confused with one that ends a do {} while() block.

For that one it is worth doing:
while (condition)
continue;

I've also managed to write:
while (...) {
....
} while (...);

And if anyone thing code should be laid out as:
do
{
...
}
while (...);
Show them:
...
}
while (.......................................................
{
...
and ask them what it is supposed to be.

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)