diff options
author | Soumya Koduri <skoduri@redhat.com> | 2016-05-11 21:41:02 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2016-05-11 19:54:43 -0700 |
commit | c769f5dbcad1492854f9fd7f1baae400d6bfeee9 (patch) | |
tree | b767fa711cd6664b95b0c0fbfa2185da0a6376c2 | |
parent | f7d9814dc16d3a0e1468e7946a9e185cc76246df (diff) |
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@redhat.com>
Reviewed-on: http://review.gluster.org/14296
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
-rw-r--r-- | xlators/features/locks/src/posix.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c index 2ff7655a170..ed07dd4b1a4 100644 --- a/xlators/features/locks/src/posix.c +++ b/xlators/features/locks/src/posix.c @@ -2257,7 +2257,7 @@ pl_lk (call_frame_t *frame, xlator_t *this, */ if (flock->l_len < 0) { flock->l_start += flock->l_len; - flock->l_len = abs (flock->l_len); + flock->l_len = labs (flock->l_len); } pl_inode = pl_inode_get (this, fd->inode); |