From: Ian Campbell Subject: Re: [PATCH RFC v2 06/13] libxl: permit declaration after statement Date: Tue, 29 Nov 2011 10:52:45 +0000 Message-ID: <1322563965.20646.37.camel@zakaz.uk.xensource.com> References: <1319827031-15395-1-git-send-email-ian.jackson@eu.citrix.com> <1319827031-15395-2-git-send-email-ian.jackson@eu.citrix.com> <1319827031-15395-3-git-send-email-ian.jackson@eu.citrix.com> <1319827031-15395-4-git-send-email-ian.jackson@eu.citrix.com> <1319827031-15395-5-git-send-email-ian.jackson@eu.citrix.com> <1319827031-15395-6-git-send-email-ian.jackson@eu.citrix.com> <1319827031-15395-7-git-send-email-ian.jackson@eu.citrix.com> <1320054652.23193.28.camel@zakaz.uk.xensource.com> <20145.29085.278257.629473@mariner.uk.xensource.com> <1320263024.3084.61.camel@cthulhu.hellion.org.uk> <20179.47462.815671.301622@mariner.uk.xensource.com> <1322563538.20646.36.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1322563538.20646.36.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: "xen-devel@lists.xensource.com" , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Tue, 2011-11-29 at 10:45 +0000, Ian Campbell wrote: > Variable declarations should either be at the top of the function or > immediately before / as part of the block which uses them. e.g. this is > unhelpful: This isn't an objection to the patch BTW, I'm happy with your reasoning... > > void a_func(void) > { > /* a bunch of code; */ > > int bar; > > /* a bunch more code not using bar */ > > bar = get_me_a_bar(); > > /* use bar lots */ > } > > Ian. > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel