summaryrefslogtreecommitdiffstats
path: root/xlators/performance
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
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')
-rw-r--r--xlators/performance/io-cache/src/io-cache.c2
-rw-r--r--xlators/performance/open-behind/src/open-behind.c6
-rw-r--r--xlators/performance/readdir-ahead/src/readdir-ahead.c10
3 files changed, 9 insertions, 9 deletions
diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c
index 843fc36396a..e8e04c03434 100644
--- a/xlators/performance/io-cache/src/io-cache.c
+++ b/xlators/performance/io-cache/src/io-cache.c
@@ -332,7 +332,7 @@ ioc_invalidate(xlator_t *this, inode_t *inode)
ioc_inode_t *ioc_inode = NULL;
inode_ctx_get(inode, this, (uint64_t *)&ioc_addr);
- ioc_inode = (void *)ioc_addr;
+ ioc_inode = (void *)(uintptr_t)ioc_addr;
if (ioc_inode)
ioc_inode_flush(ioc_inode);
diff --git a/xlators/performance/open-behind/src/open-behind.c b/xlators/performance/open-behind/src/open-behind.c
index c8f818717ef..8021fd07a2e 100644
--- a/xlators/performance/open-behind/src/open-behind.c
+++ b/xlators/performance/open-behind/src/open-behind.c
@@ -105,14 +105,14 @@ ob_inode_get(xlator_t *this, inode_t *inode)
if (ob_inode == NULL)
goto unlock;
- value = (uint64_t)((void *)ob_inode);
+ value = (uint64_t)(uintptr_t)ob_inode;
ret = __inode_ctx_set(inode, this, &value);
if (ret < 0) {
ob_inode_free(ob_inode);
ob_inode = NULL;
}
} else {
- ob_inode = (ob_inode_t *)value;
+ ob_inode = (ob_inode_t *)(uintptr_t)value;
}
}
unlock:
@@ -1109,7 +1109,7 @@ ob_forget(xlator_t *this, inode_t *inode)
inode_ctx_del(inode, this, &value);
if (value) {
- ob_inode = (ob_inode_t *)((void *)value);
+ ob_inode = (ob_inode_t *)(uintptr_t)value;
ob_inode_free(ob_inode);
}
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);