]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commit
xenalyze: fix misleading indentation.
authorIan Campbell <ian.campbell@citrix.com>
Fri, 22 Jan 2016 14:27:28 +0000 (14:27 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 26 Jan 2016 16:24:39 +0000 (16:24 +0000)
commitebdba150bff1d914805d60efa576337bbef0c305
tree88d8be946f542b92c1e0fe63717bc754117a27bb
parent38992e5df2a3978c6bab7e6e8cbd46c1ab2c5a5e
xenalyze: fix misleading indentation.

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>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
tools/xentrace/xenalyze.c