Bug 1295784 - dht: misleading indentation, gcc-6
Summary: dht: misleading indentation, gcc-6
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: distribute
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kaleb KEITHLEY
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-05 12:49 UTC by Kaleb KEITHLEY
Modified: 2016-06-16 13:53 UTC (History)
2 users (show)

Fixed In Version: glusterfs-3.8rc2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-16 13:53:44 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Kaleb KEITHLEY 2016-01-05 12:49:07 UTC
Description of problem:

compile with gcc-6. -Wall now includes -Wmisleading-indentation, which reports this:

...
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] &&
                         ^~
...



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Vijay Bellur 2016-01-05 12:55:50 UTC
REVIEW: http://review.gluster.org/13176 (dht: missleading indendentation, gcc-6) posted (#1) for review on master by Kaleb KEITHLEY (kkeithle)

Comment 2 Vijay Bellur 2016-01-06 02:07:41 UTC
COMMIT: http://review.gluster.org/13176 committed in master by Jeff Darcy (jdarcy) 
------
commit a2119ef0f18d51500f5b496caf8dfd8f192dd490
Author: Kaleb S KEITHLEY <kkeithle>
Date:   Tue Jan 5 07:52:25 2016 -0500

    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>
    Reviewed-on: http://review.gluster.org/13176
    Reviewed-by: N Balachandran <nbalacha>
    Reviewed-by: Shyamsundar Ranganathan <srangana>
    Tested-by: Gluster Build System <jenkins.com>

Comment 3 Niels de Vos 2016-06-16 13:53:44 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.8.0, please open a new bug report.

glusterfs-3.8.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://blog.gluster.org/2016/06/glusterfs-3-8-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user


Note You need to log in before you can comment on or make changes to this bug.