dht: missleading indendentation, gcc-6

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 <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/13176
Reviewed-by: N Balachandran <nbalacha@redhat.com>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
This commit is contained in:
Kaleb S KEITHLEY 2016-01-05 07:52:25 -05:00 committed by Jeff Darcy
parent 1e779acec7
commit a2119ef0f1

View File

@ -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;
}
}
}