xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@citrix.com>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: xen-devel@lists.xen.org
Subject: Re: [PATCH 1/2] xenalyze: fix misleading indentation.
Date: Tue, 26 Jan 2016 11:57:46 +0000	[thread overview]
Message-ID: <56A75F3A.3060307@citrix.com> (raw)
In-Reply-To: <1453472849-25496-1-git-send-email-ian.campbell@citrix.com>

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<K_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<I_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<K_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_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 <ian.campbell@citrix.com>

!!!

Hrm, well obviously the "weighted percentiles" have been wonky for a
long time. :-/

Reviewed-by: George Dunlap <george.dunlap@citrix.com>

  reply	other threads:[~2016-01-26 11:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-22 14:27 [PATCH 0/2] xenalyze: fixes for gcc-6's -Wmisleading-indentation Ian Campbell
2016-01-22 14:27 ` [PATCH 1/2] xenalyze: fix misleading indentation Ian Campbell
2016-01-26 11:57   ` George Dunlap [this message]
2016-01-22 14:27 ` [PATCH 2/2] xenalyze: remove cr3_compare_total Ian Campbell
2016-01-26 12:01   ` George Dunlap
2016-01-26 16:51 ` [PATCH 0/2] xenalyze: fixes for gcc-6's -Wmisleading-indentation Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56A75F3A.3060307@citrix.com \
    --to=george.dunlap@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).