qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH RFC] scripts/checkpatch.pl: Bug fix


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH RFC] scripts/checkpatch.pl: Bug fix
Date: Thu, 15 Mar 2018 11:50:55 +0000

On 15 March 2018 at 11:45, Su Hang <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]