summaryrefslogtreecommitdiffstats
path: root/xlators/performance/readdir-ahead
diff options
context:
space:
mode:
authorXavi Hernandez <xhernandez@redhat.com>2018-09-25 13:22:47 +0200
committerAmar Tumballi <amarts@redhat.com>2018-10-10 05:50:29 +0000
commit2d96ce8faa277809c0c94aca54320483889f577d (patch)
tree999ef8b148b186e6bf74bb22c3ff670fc6e34d38 /xlators/performance/readdir-ahead
parent0cda00f08d3d620be89830bad9d0e252648388e9 (diff)
all: fix warnings on non 64-bits architectures
When compiling in other architectures there appear many warnings. Some of them are actual problems that prevent gluster to work correctly on those architectures. Change-Id: Icdc7107a2bc2da662903c51910beddb84bdf03c0 fixes: bz#1632717 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
Diffstat (limited to 'xlators/performance/readdir-ahead')
-rw-r--r--xlators/performance/readdir-ahead/src/readdir-ahead.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/xlators/performance/readdir-ahead/src/readdir-ahead.c b/xlators/performance/readdir-ahead/src/readdir-ahead.c
index 7a5f989eb73..71d0e23c95c 100644
--- a/xlators/performance/readdir-ahead/src/readdir-ahead.c
+++ b/xlators/performance/readdir-ahead/src/readdir-ahead.c
@@ -68,13 +68,13 @@ get_rda_fd_ctx(fd_t *fd, xlator_t *this)
/* ctx offset values initialized to 0 */
ctx->xattrs = NULL;
- if (__fd_ctx_set(fd, this, (uint64_t)ctx) < 0) {
+ if (__fd_ctx_set(fd, this, (uint64_t)(uintptr_t)ctx) < 0) {
GF_FREE(ctx);
ctx = NULL;
goto out;
}
} else {
- ctx = (struct rda_fd_ctx *)val;
+ ctx = (struct rda_fd_ctx *)(uintptr_t)val;
}
out:
UNLOCK(&fd->lock);
@@ -90,7 +90,7 @@ __rda_inode_ctx_get(inode_t *inode, xlator_t *this)
ret = __inode_ctx_get1(inode, this, &ctx_uint);
if (ret == 0)
- return (rda_inode_ctx_t *)ctx_uint;
+ return (rda_inode_ctx_t *)(uintptr_t)ctx_uint;
ctx_p = GF_CALLOC(1, sizeof(*ctx_p), gf_rda_mt_inode_ctx_t);
if (!ctx_p)
@@ -1064,7 +1064,7 @@ rda_releasedir(xlator_t *this, fd_t *fd)
if (fd_ctx_del(fd, this, &val) < 0)
return -1;
- ctx = (struct rda_fd_ctx *)val;
+ ctx = (struct rda_fd_ctx *)(uintptr_t)val;
if (!ctx)
return 0;
@@ -1092,7 +1092,7 @@ rda_forget(xlator_t *this, inode_t *inode)
if (!ctx_uint)
return 0;
- ctx = (rda_inode_ctx_t *)ctx_uint;
+ ctx = (rda_inode_ctx_t *)(uintptr_t)ctx_uint;
GF_FREE(ctx);