Bug 1335231 - features/locks: clang compile warning in posix.c
Summary: features/locks: clang compile warning in posix.c
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: locks
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Soumya Koduri
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-11 15:42 UTC by Kaleb KEITHLEY
Modified: 2017-03-27 18:10 UTC (History)
1 user (show)

Fixed In Version: glusterfs-3.9.0
Clone Of:
Environment:
Last Closed: 2017-03-27 18:10:35 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Kaleb KEITHLEY 2016-05-11 15:42:35 UTC
Description of problem:

Making all in features
Making all in locks
Making all in src
  CC       common.lo
  CC       posix.lo
posix.c:2260:32: warning: absolute value function 'abs' given an argument of type 'off_t' (aka 'long') but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value]
                flock->l_len = abs (flock->l_len);
                               ^
posix.c:2260:32: note: use function 'labs' instead
                flock->l_len = abs (flock->l_len);
                               ^~~
                               labs
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 Vijay Bellur 2016-05-11 16:12:39 UTC
REVIEW: http://review.gluster.org/14296 (locks: Fix a compile warning to use labs instead of abs) posted (#1) for review on master by soumya k (skoduri)

Comment 2 Vijay Bellur 2016-05-12 02:54:46 UTC
COMMIT: http://review.gluster.org/14296 committed in master by Pranith Kumar Karampuri (pkarampu) 
------
commit c769f5dbcad1492854f9fd7f1baae400d6bfeee9
Author: Soumya Koduri <skoduri>
Date:   Wed May 11 21:41:02 2016 +0530

    locks: Fix a compile warning to use labs instead of abs
    
    This addresses below compile warning generated -
    
    posix.c:2260:32: warning: absolute value function 'abs' given an argument of type 'off_t' (aka 'long') but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value]
                    flock->l_len = abs (flock->l_len);
                                   ^
    posix.c:2260:32: note: use function 'labs' instead
                    flock->l_len = abs (flock->l_len);
                                   ^~~
                                   labs
    
    Change-Id: Ifd8c5442de4076a2d4425487eb119ce89097779d
    BUG: 1335231
    Signed-off-by: Soumya Koduri <skoduri>
    Reviewed-on: http://review.gluster.org/14296
    Smoke: Gluster Build System <jenkins.com>
    Reviewed-by: Kaleb KEITHLEY <kkeithle>
    Tested-by: Kaleb KEITHLEY <kkeithle>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.com>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>

Comment 3 Shyamsundar 2017-03-27 18:10:35 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.9.0, please open a new bug report.

glusterfs-3.9.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/gluster-users/2016-November/029281.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.