diff options
author | Xavi Hernandez <xhernandez@redhat.com> | 2018-09-25 13:22:47 +0200 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-10-10 05:50:29 +0000 |
commit | 2d96ce8faa277809c0c94aca54320483889f577d (patch) | |
tree | 999ef8b148b186e6bf74bb22c3ff670fc6e34d38 /xlators/storage/posix | |
parent | 0cda00f08d3d620be89830bad9d0e252648388e9 (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/storage/posix')
-rw-r--r-- | xlators/storage/posix/src/posix-helpers.c | 2 | ||||
-rw-r--r-- | xlators/storage/posix/src/posix-inode-fd-ops.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c index 99ee094c114..4c3f064f564 100644 --- a/xlators/storage/posix/src/posix-helpers.c +++ b/xlators/storage/posix/src/posix-helpers.c @@ -2582,7 +2582,7 @@ __posix_inode_ctx_get(inode_t *inode, xlator_t *this) ret = __inode_ctx_get(inode, this, &ctx_uint); if (ret == 0) { - return (posix_inode_ctx_t *)ctx_uint; + return (posix_inode_ctx_t *)(uintptr_t)ctx_uint; } ctx_p = GF_CALLOC(1, sizeof(*ctx_p), gf_posix_mt_inode_ctx_t); diff --git a/xlators/storage/posix/src/posix-inode-fd-ops.c b/xlators/storage/posix/src/posix-inode-fd-ops.c index 4b6716fcd7f..4ce181d9c0e 100644 --- a/xlators/storage/posix/src/posix-inode-fd-ops.c +++ b/xlators/storage/posix/src/posix-inode-fd-ops.c @@ -2337,7 +2337,7 @@ posix_setxattr(call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *dict, goto unlock; } - sprintf(stime, "%lu", tmp_stbuf.ia_mtime); + sprintf(stime, "%" PRId64, tmp_stbuf.ia_mtime); /*TODO: may be should consider nano-second also */ if (strncmp(stime, tdata->data, tdata->len) != 0) { @@ -2350,7 +2350,7 @@ posix_setxattr(call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *dict, goto unlock; } - len = sprintf(sxattr, "%lu", tmp_stbuf.ia_size); + len = sprintf(sxattr, "%" PRIu64, tmp_stbuf.ia_size); ret = sys_lsetxattr(real_path, GF_CS_OBJECT_SIZE, sxattr, len, flags); @@ -5400,7 +5400,7 @@ posix_forget(xlator_t *this, inode_t *inode) if (!ctx_uint) return 0; - ctx = (posix_inode_ctx_t *)ctx_uint; + ctx = (posix_inode_ctx_t *)(uintptr_t)ctx_uint; if (ctx->unlink_flag == GF_UNLINK_TRUE) { POSIX_GET_FILE_UNLINK_PATH(priv_posix->base_path, inode->gfid, |