Received: from eggs.gnu.org ([2001:4830:134:3::10]:57691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIutA-0007el-GW for qemu-devel@nongnu.org; Thu, 27 Feb 2014 01:56:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WIut5-0003VZ-L2 for qemu-devel@nongnu.org; Thu, 27 Feb 2014 01:56:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51228) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIut5-0003VT-DT for qemu-devel@nongnu.org; Thu, 27 Feb 2014 01:56:07 -0500 From: Markus Armbruster References: <1393431869-24635-1-git-send-email-ehabkost@redhat.com> Date: Thu, 27 Feb 2014 07:55:59 +0100 In-Reply-To: <1393431869-24635-1-git-send-email-ehabkost@redhat.com> (Eduardo Habkost's message of "Wed, 26 Feb 2014 13:24:29 -0300") Message-ID: <87bnxtgi2o.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH RESEND] CODING_STYLE: Section about mixed declarations List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: Peter Maydell , Paolo Bonzini , qemu-devel@nongnu.org, Andreas =?utf-8?Q?F=C3=A4rber?= , Stefan Weil Eduardo Habkost 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 > Reviewed-by: Stefan Weil > --- > 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