From c769f5dbcad1492854f9fd7f1baae400d6bfeee9 Mon Sep 17 00:00:00 2001 From: Soumya Koduri Date: Wed, 11 May 2016 21:41:02 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/14296 Smoke: Gluster Build System Reviewed-by: Kaleb KEITHLEY Tested-by: Kaleb KEITHLEY NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Pranith Kumar Karampuri --- xlators/features/locks/src/posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/features') 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); -- cgit