From a2119ef0f18d51500f5b496caf8dfd8f192dd490 Mon Sep 17 00:00:00 2001 From: Kaleb S KEITHLEY Date: Tue, 5 Jan 2016 07:52:25 -0500 Subject: dht: missleading indendentation, gcc-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gcc-6 now has -Wmisleading-indentation as part of -Wall. compiling with gcc-6 gives this warning. ... dht-diskusage.c: In function ‘dht_subvol_has_err’: dht-diskusage.c:361:33: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation] goto out; ^~~~ dht-diskusage.c:358:25: note: ...this ‘if’ clause, but it is not if (conf->decommissioned_bricks[i] && ^~ ... Inspection of the source shows that without braces the loop is terminated prematurely. Change-Id: Ica48a8c59ee5d0a206797827d7920259d33b47ec BUG: 1295784 Signed-off-by: Kaleb S KEITHLEY Reviewed-on: http://review.gluster.org/13176 Reviewed-by: N Balachandran Reviewed-by: Shyamsundar Ranganathan Tested-by: Gluster Build System --- xlators/cluster/dht/src/dht-diskusage.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xlators/cluster/dht/src') diff --git a/xlators/cluster/dht/src/dht-diskusage.c b/xlators/cluster/dht/src/dht-diskusage.c index b85c78a540b..1eb9e63c531 100644 --- a/xlators/cluster/dht/src/dht-diskusage.c +++ b/xlators/cluster/dht/src/dht-diskusage.c @@ -356,9 +356,10 @@ int32_t dht_subvol_has_err (dht_conf_t *conf, xlator_t *this, if (conf->decommission_subvols_cnt) { for (i = 0; i < conf->subvolume_cnt; i++) { if (conf->decommissioned_bricks[i] && - conf->decommissioned_bricks[i] == this) + conf->decommissioned_bricks[i] == this) { ret = -1; goto out; + } } } -- cgit