From c6c526010fa4b9d9628e445036e8f84b00bfb9a8 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Wed, 6 Sep 2017 14:46:20 +0200 Subject: Fix the type of len, a warning is triggered clang show this warning on FreeBSD: posix.c:133:17: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] A closer look on the code show that sys_readlink is returning a ssize_t, not a size_t, who is unsigned. Change-Id: Idb6a440ea44cc2168b0dd85f791c7955caa67c8c BUG: 1488909 Signed-off-by: Michael Scherer Reviewed-on: https://review.gluster.org/18220 Tested-by: Michael Scherer CentOS-regression: Gluster Build System Smoke: Gluster Build System Reviewed-by: Jeff Darcy --- xlators/storage/posix/src/posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators') diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index 1e50ad79b78..b1ab006219d 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -116,7 +116,7 @@ posix_symlinks_match (xlator_t *this, loc_t *loc, uuid_t gfid) char linkname_actual[PATH_MAX] = {0,}; char linkname_expected[PATH_MAX] = {0}; char *dir_handle = NULL; - size_t len = 0; + ssize_t len = 0; size_t handle_size = 0; gf_boolean_t ret = _gf_false; -- cgit