On 15 March 2018 at 11:45, Su Hang <[email protected]> wrote:
> Bug fix: checkpatch.pl stops complaining about following pattern:
> """
> do {
> //do somethins;
> } while (conditions);
> """
>
> Two things need to be mentioned:
> 1) Before I casue this bug, checkpatch.pl will raise a wrong
> complain:
> """
> ERROR: braces {} are necessary even for single statement blocks
> + for (i == 0; i < 0; ++i)
> + {
> + ;
> + } else
> """
This is a bit of an odd example -- for() loops don't
take "else" clauses, so what is the 'else' doing here?
(Also, for QEMU style the "{" should be on the same line as the for(),
not on a line of its own.)
thanks
-- PMM