From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH 1/2] xenalyze: fix misleading indentation. Date: Tue, 26 Jan 2016 11:57:46 +0000 Message-ID: <56A75F3A.3060307@citrix.com> References: <1453472830.4320.97.camel@citrix.com> <1453472849-25496-1-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1453472849-25496-1-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 22/01/16 14:27, Ian Campbell wrote: > gcc-6 adds -Wmisleading-indentation which found these issues. > > xenalyze.c: In function 'weighted_percentile': > xenalyze.c:2136:18: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation] > L=I; L_weight = I_weight; > ^~~~~~~~ > > xenalyze.c:2135:9: note: ...this 'if' clause, but it is not > if(J_weight ^~ > > xenalyze.c:2138:18: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation] > R=J; R_weight = J_weight; > ^~~~~~~~ > > xenalyze.c:2137:9: note: ...this 'if' clause, but it is not > if(K_weight ^~ > > xenalyze.c: In function 'self_weighted_percentile': > xenalyze.c:2215:18: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation] > L=I; L_weight = I_weight; > ^~~~~~~~ > > xenalyze.c:2214:9: note: ...this 'if' clause, but it is not > if(J_weight ^~ > > xenalyze.c:2217:18: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation] > R=J; R_weight = J_weight; > ^~~~~~~~ > > xenalyze.c:2216:9: note: ...this 'if' clause, but it is not > if(K_weight ^~ > > I've modified according to what I think the intention is, i.e. added braces > rather than moving the line in question out a level. > > I have only build tested the result. > > Signed-off-by: Ian Campbell !!! Hrm, well obviously the "weighted percentiles" have been wonky for a long time. :-/ Reviewed-by: George Dunlap