qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH RESEND] CODING_STYLE: Section about mixed declar


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH RESEND] CODING_STYLE: Section about mixed declarations
Date: Thu, 27 Feb 2014 07:55:59 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Eduardo Habkost <address@hidden> writes:

> We had an unwritten rule about declarations having to be at beginning of
> blocks. Make it a written rule.
>
> Signed-off-by: Eduardo Habkost <address@hidden>
> Reviewed-by: Stefan Weil <address@hidden>
> ---
> Changes v2:
>  * s/be at beginning/be at the beginning/
> ---
>  CODING_STYLE | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/CODING_STYLE b/CODING_STYLE
> index dcbce28..efa5cc3 100644
> --- a/CODING_STYLE
> +++ b/CODING_STYLE
> @@ -84,3 +84,10 @@ and clarity it comes on a line by itself:
>  Rationale: a consistent (except for functions...) bracing style reduces
>  ambiguity and avoids needless churn when lines are added or removed.
>  Furthermore, it is the QEMU coding style.
> +
> +5. Declarations
> +
> +Mixed declarations (interleaving statements and declarations within blocks) 
> are
> +not allowed; declarations should be at the beginning of blocks.  In other 
> words,
> +the code should not generate warnings if using GCC's
> +-Wdeclaration-after-statement option.

Long lines.  We'll live.

I'd like to see either arguments or a commit.  For good measure:

Reviewed-by: Markus Armbruster <address@hidden>



reply via email to

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