Bug 1335251 - mgmt/glusterd: clang compile warnings in glusterd-snapshot.c
Summary: mgmt/glusterd: clang compile warnings in glusterd-snapshot.c
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: snapshot
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Sunny Kumar
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-11 16:53 UTC by Kaleb KEITHLEY
Modified: 2017-12-08 17:31 UTC (History)
2 users (show)

Fixed In Version: glusterfs-3.13.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-08 17:31:43 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Kaleb KEITHLEY 2016-05-11 16:53:20 UTC
Description of problem:


Making all in mgmt
Making all in glusterd
Making all in src
  CC       glusterd_la-glusterd.lo
  CC       glusterd_la-glusterd-handler.lo
  CC       glusterd_la-glusterd-sm.lo
  CC       glusterd_la-glusterd-op-sm.lo
  CC       glusterd_la-glusterd-utils.lo
glusterd-utils.c:7362:21: warning: address of array 'rebal->rebalance_id' will always evaluate to 'true' [-Wpointer-bool-conversion]
        if (!rebal->rebalance_id)
            ~~~~~~~~^~~~~~~~~~~~
1 warning generated.




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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Kaleb KEITHLEY 2016-05-11 16:55:33 UTC
  CC       glusterd_la-glusterd-snapshot.lo
glusterd-snapshot.c:4018:23: warning: comparison of constant -1 with expression of type 'gf_boolean_t' (aka 'enum _gf_boolean') is always false [-Wtautological-constant-out-of-range-compare]
        if (timestamp == -1) {
            ~~~~~~~~~ ^  ~~
1 warning generated.

Comment 2 Atin Mukherjee 2017-01-25 08:10:12 UTC
Making all in mgmt
Making all in glusterd
Making all in src
  CC       glusterd_la-glusterd.lo
  CC       glusterd_la-glusterd-handler.lo
  CC       glusterd_la-glusterd-sm.lo
  CC       glusterd_la-glusterd-op-sm.lo
  CC       glusterd_la-glusterd-utils.lo
glusterd-utils.c:7362:21: warning: address of array 'rebal->rebalance_id' will always evaluate to 'true' [-Wpointer-bool-conversion]
        if (!rebal->rebalance_id)

The above has been fixed by http://review.gluster.org/14818 .

The other snapshot issue highlighted in comment 1 is yet to be addressed, I am moving this BZ to snapshot component now with a change in the title.

Comment 3 Worker Ant 2017-08-18 09:41:09 UTC
REVIEW: https://review.gluster.org/18062 (snapshot: clang compile warning) posted (#1) for review on master by Sunny Kumar

Comment 4 Worker Ant 2017-09-04 16:48:40 UTC
COMMIT: https://review.gluster.org/18062 committed in master by mohammed rafi  kc (rkavunga) 
------
commit d692f167662300ffad8d3ed44672182130025c75
Author: Sunny Kumar <sunkumar>
Date:   Fri Aug 18 14:56:46 2017 +0530

    snapshot: clang compile warning
    
    Warning type: NO_EFFECT
    xlators/mgmt/glusterd/src/glusterd-snapshot.c:4004 : warning: comparison of
    constant -1 with expression of type 'gf_boolean_t' (aka 'enum _gf_boolean')
    is always false.
    
    solution : "timestamp" was formerly declared as gf_boolean_t, now changed to
                int.
    
    Change-Id: Ie461537f06fe2971e2b09a428a22331808c41a13
    BUG: 1335251
    Signed-off-by: Sunny Kumar <sunkumar>
    Reviewed-on: https://review.gluster.org/18062
    Tested-by: Sunny Kumar
    Smoke: Gluster Build System <jenkins.org>
    Reviewed-by: Amar Tumballi <amarts>
    Reviewed-by: mohammed rafi  kc <rkavunga>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Atin Mukherjee <amukherj>

Comment 5 Shyamsundar 2017-12-08 17:31:43 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.13.0, please open a new bug report.

glusterfs-3.13.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://lists.gluster.org/pipermail/announce/2017-December/000087.html
[2] https://www.gluster.org/pipermail/gluster-users/


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