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/features/bit-rot | |
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/features/bit-rot')
-rw-r--r-- | xlators/features/bit-rot/src/bitd/bit-rot.c | 3 | ||||
-rw-r--r-- | xlators/features/bit-rot/src/stub/bit-rot-stub.c | 6 | ||||
-rw-r--r-- | xlators/features/bit-rot/src/stub/bit-rot-stub.h | 2 |
3 files changed, 5 insertions, 6 deletions
diff --git a/xlators/features/bit-rot/src/bitd/bit-rot.c b/xlators/features/bit-rot/src/bitd/bit-rot.c index 75fa0490c90..8ea89257836 100644 --- a/xlators/features/bit-rot/src/bitd/bit-rot.c +++ b/xlators/features/bit-rot/src/bitd/bit-rot.c @@ -351,8 +351,7 @@ br_calculate_obj_checksum(unsigned char *md, br_child_t *child, fd_t *fd, &sha256); if (ret < 0) { gf_msg(this->name, GF_LOG_ERROR, 0, BRB_MSG_BLOCK_READ_FAILED, - "reading block with " - "offset %lu of object %s failed", + "reading block with offset %" PRIu64 " of object %s failed", offset, uuid_utoa(fd->inode->gfid)); break; } diff --git a/xlators/features/bit-rot/src/stub/bit-rot-stub.c b/xlators/features/bit-rot/src/stub/bit-rot-stub.c index c6c9b6aafce..0fc2b651b2d 100644 --- a/xlators/features/bit-rot/src/stub/bit-rot-stub.c +++ b/xlators/features/bit-rot/src/stub/bit-rot-stub.c @@ -410,7 +410,7 @@ br_stub_init_inode_versions(xlator_t *this, fd_t *fd, inode_t *inode, goto free_ctx; if (ctx_addr) - *ctx_addr = (uint64_t)ctx; + *ctx_addr = (uint64_t)(uintptr_t)ctx; return 0; free_ctx: @@ -3411,14 +3411,14 @@ br_stub_ictxmerge(xlator_t *this, fd_t *fd, inode_t *inode, ret = br_stub_get_inode_ctx(this, inode, &ctxaddr); if (ret < 0) goto done; - ctx = (br_stub_inode_ctx_t *)ctxaddr; + ctx = (br_stub_inode_ctx_t *)(uintptr_t)ctxaddr; LOCK(&linked_inode->lock); { ret = __br_stub_get_inode_ctx(this, linked_inode, &lctxaddr); if (ret < 0) goto unblock; - lctx = (br_stub_inode_ctx_t *)lctxaddr; + lctx = (br_stub_inode_ctx_t *)(uintptr_t)lctxaddr; GF_ASSERT(list_is_singular(&ctx->fd_list)); br_stub_fd = list_first_entry(&ctx->fd_list, br_stub_fd_t, list); diff --git a/xlators/features/bit-rot/src/stub/bit-rot-stub.h b/xlators/features/bit-rot/src/stub/bit-rot-stub.h index a15667e323a..9e6492ebdd7 100644 --- a/xlators/features/bit-rot/src/stub/bit-rot-stub.h +++ b/xlators/features/bit-rot/src/stub/bit-rot-stub.h @@ -255,7 +255,7 @@ br_stub_get_inode_ctx(xlator_t *this, inode_t *inode, uint64_t *ctx) static inline int br_stub_set_inode_ctx(xlator_t *this, inode_t *inode, br_stub_inode_ctx_t *ctx) { - uint64_t ctx_addr = (uint64_t)ctx; + uint64_t ctx_addr = (uint64_t)(uintptr_t)ctx; return inode_ctx_set(inode, this, &ctx_addr); } |