qemu-devel
[Top][All Lists]
Advanced

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

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


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [PATCH] CODING_STYLE: Section about mixed declarations
Date: Wed, 19 Feb 2014 16:34:08 -0300
User-agent: Mutt/1.5.21 (2010-09-15)

Ping? Who is willing to apply this?

On Sun, Feb 09, 2014 at 07:03:01AM -0200, Eduardo Habkost wrote:
> 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>
> ---
>  CODING_STYLE | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/CODING_STYLE b/CODING_STYLE
> index dcbce28..f6eb319 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 beginning of blocks.  In other words,
> +the code should not generate warnings if using GCC's
> +-Wdeclaration-after-statement option.
> -- 
> 1.8.5.3
> 
> 

-- 
Eduardo



reply via email to

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